pub struct BodyLimitConfig {
pub max_bytes: u64,
}Expand description
Configuration for request body size limits.
Fields§
§max_bytes: u64Maximum body size in bytes.
Implementations§
Source§impl BodyLimitConfig
impl BodyLimitConfig
Sourcepub fn check_content_length(
&self,
content_length: Option<u64>,
) -> Result<(), OxiHttpError>
pub fn check_content_length( &self, content_length: Option<u64>, ) -> Result<(), OxiHttpError>
Check if a content-length exceeds the limit.
Returns Ok(()) if within limits, Err with a 413 status otherwise.
Trait Implementations§
Source§impl Clone for BodyLimitConfig
impl Clone for BodyLimitConfig
Source§fn clone(&self) -> BodyLimitConfig
fn clone(&self) -> BodyLimitConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BodyLimitConfig
Auto Trait Implementations§
impl Freeze for BodyLimitConfig
impl RefUnwindSafe for BodyLimitConfig
impl Send for BodyLimitConfig
impl Sync for BodyLimitConfig
impl Unpin for BodyLimitConfig
impl UnsafeUnpin for BodyLimitConfig
impl UnwindSafe for BodyLimitConfig
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