pub struct Body<E> { /* private fields */ }Expand description
Extracts cache key parts from request bodies.
Supports hash, jq (JSON), and regex extraction modes. Chain with other extractors using the builder pattern.
§Caveats
The entire body is buffered into memory during extraction.
The body is returned as BufferedBody::Complete
after extraction.
Implementations§
Source§impl<S> Body<NeutralExtractor<S>>
impl<S> Body<NeutralExtractor<S>>
Sourcepub fn new(extraction: BodyExtraction) -> Self
pub fn new(extraction: BodyExtraction) -> Self
Creates a body extractor with the given extraction mode.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Body<E>where
E: Freeze,
impl<E> RefUnwindSafe for Body<E>where
E: RefUnwindSafe,
impl<E> Send for Body<E>where
E: Send,
impl<E> Sync for Body<E>where
E: Sync,
impl<E> Unpin for Body<E>where
E: Unpin,
impl<E> UnwindSafe for Body<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<E> BodyExtractor for Ewhere
E: Extractor,
impl<E> BodyExtractor for Ewhere
E: Extractor,
Source§fn body(self, extraction: BodyExtraction) -> Body<E>
fn body(self, extraction: BodyExtraction) -> Body<E>
Adds body extraction with the specified mode.
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