pub struct BodyLimitsConfig {
pub max_request_bytes: Option<usize>,
pub max_response_bytes: Option<usize>,
}Expand description
Global hard ceilings on request and response body size.
use praxis_core::config::BodyLimitsConfig;
let limits: BodyLimitsConfig = serde_yaml::from_str(
r#"
max_request_bytes: 10485760
max_response_bytes: 5242880
"#,
)
.unwrap();
assert_eq!(limits.max_request_bytes, Some(10_485_760));
assert_eq!(limits.max_response_bytes, Some(5_242_880));Fields§
§max_request_bytes: Option<usize>Maximum request body size in bytes.
max_response_bytes: Option<usize>Maximum response body size in bytes.
Trait Implementations§
Source§impl Clone for BodyLimitsConfig
impl Clone for BodyLimitsConfig
Source§fn clone(&self) -> BodyLimitsConfig
fn clone(&self) -> BodyLimitsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BodyLimitsConfig
impl Debug for BodyLimitsConfig
Source§impl Default for BodyLimitsConfig
impl Default for BodyLimitsConfig
Source§fn default() -> BodyLimitsConfig
fn default() -> BodyLimitsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BodyLimitsConfigwhere
BodyLimitsConfig: Default,
impl<'de> Deserialize<'de> for BodyLimitsConfigwhere
BodyLimitsConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BodyLimitsConfig
impl RefUnwindSafe for BodyLimitsConfig
impl Send for BodyLimitsConfig
impl Sync for BodyLimitsConfig
impl Unpin for BodyLimitsConfig
impl UnsafeUnpin for BodyLimitsConfig
impl UnwindSafe for BodyLimitsConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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