pub struct Normalizer { /* private fields */ }Implementations§
Source§impl Normalizer
impl Normalizer
pub fn new(limits: &LimitsConfig) -> Self
Sourcepub fn normalize(
&self,
ctx: &mut RequestContext,
) -> Result<(), NormalizationError>
pub fn normalize( &self, ctx: &mut RequestContext, ) -> Result<(), NormalizationError>
Validate limits and populate ctx.normalized from the raw request fields.
Call this before the pipeline runs. Returns an error (→ 400) if any defensive limit is exceeded; the error is not recoverable.
Auto Trait Implementations§
impl Freeze for Normalizer
impl RefUnwindSafe for Normalizer
impl Send for Normalizer
impl Sync for Normalizer
impl Unpin for Normalizer
impl UnsafeUnpin for Normalizer
impl UnwindSafe for Normalizer
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