Skip to content

Implement Default for limit::ResponseBody#679

Open
muhamadazmy wants to merge 1 commit into
tower-rs:mainfrom
muhamadazmy:pr679
Open

Implement Default for limit::ResponseBody#679
muhamadazmy wants to merge 1 commit into
tower-rs:mainfrom
muhamadazmy:pr679

Conversation

@muhamadazmy
Copy link
Copy Markdown

@muhamadazmy muhamadazmy commented May 18, 2026

Implement Default for limit::ResponseBody

Summary:
This adds a Default implementation to limit::ResponseBody if the wrapped
body also implements Default

This allows combining services as follows:

ServiceBudiler::new()
  .layer(CorsLayer::very_permissive())
  .layer(RequestBodyLimitLayer::new(limit))

Summary:
This adds a `Default` implementation to `limit::ResponseBody` if the wrapped
body also implements `Default`

This allows combining services as follows:

```
ServiceBudiler::new()
  .layer(CorsLayer::very_permissive())
  .layer(RequestBodyLimitLayer::new(limit)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant