pub struct BodyLimit { /* private fields */ }Expand description
Can be used to communicate the desire to limit the size of request/response bodies.
Implementations§
Source§impl BodyLimit
impl BodyLimit
Sourcepub fn request_only(limit: usize) -> Self
pub fn request_only(limit: usize) -> Self
Create a new BodyLimit, with the given limit to be applied to the request only.
Sourcepub fn response_only(limit: usize) -> Self
pub fn response_only(limit: usize) -> Self
Create a new BodyLimit, with the given limit to be applied to the response only.
Sourcepub fn symmetric(limit: usize) -> Self
pub fn symmetric(limit: usize) -> Self
Create a new BodyLimit, with the given limit to be applied to both the request and response bodies.
Sourcepub fn asymmetric(request: usize, response: usize) -> Self
pub fn asymmetric(request: usize, response: usize) -> Self
Create a new BodyLimit, with the given limits
respectively to be applied to the request and response bodies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodyLimit
impl RefUnwindSafe for BodyLimit
impl Send for BodyLimit
impl Sync for BodyLimit
impl Unpin for BodyLimit
impl UnwindSafe for BodyLimit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more