pub struct NeutralExtractor<ReqBody> { /* private fields */ }Expand description
Base extractor that produces an empty cache key.
This is an internal building block used by other extractors. Users should
start extractor chains with Method::new() instead.
§Type Parameters
ReqBody- The HTTP request body type. Must implementhyper::body::BodywithSendbounds. This parameter propagates through extractor chains to ensure type safety.
§When You’ll Encounter This
You typically don’t create this directly. It appears as the innermost type in extractor chains:
use hitbox_http::extractors::{Method, path::PathExtractor};
// The full type is Path<Method<NeutralExtractor<Empty<Bytes>>>>
let extractor = Method::new().path("/users/{id}");Implementations§
Source§impl<ResBody> NeutralExtractor<ResBody>
impl<ResBody> NeutralExtractor<ResBody>
Sourcepub fn new() -> NeutralExtractor<ResBody>
pub fn new() -> NeutralExtractor<ResBody>
Creates a new neutral extractor.
Trait Implementations§
Source§impl<ReqBody> Debug for NeutralExtractor<ReqBody>where
ReqBody: Debug,
impl<ReqBody> Debug for NeutralExtractor<ReqBody>where
ReqBody: Debug,
Source§impl<ResBody> Default for NeutralExtractor<ResBody>
impl<ResBody> Default for NeutralExtractor<ResBody>
Source§fn default() -> NeutralExtractor<ResBody>
fn default() -> NeutralExtractor<ResBody>
Returns the “default value” for a type. Read more
Source§impl<ResBody> Extractor for NeutralExtractor<ResBody>
impl<ResBody> Extractor for NeutralExtractor<ResBody>
Source§type Subject = CacheableHttpRequest<ResBody>
type Subject = CacheableHttpRequest<ResBody>
The type from which cache key components are extracted.
Source§fn get<'life0, 'async_trait>(
&'life0 self,
subject: <NeutralExtractor<ResBody> as Extractor>::Subject,
) -> Pin<Box<dyn Future<Output = KeyParts<<NeutralExtractor<ResBody> as Extractor>::Subject>> + Send + 'async_trait>>where
'life0: 'async_trait,
NeutralExtractor<ResBody>: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
subject: <NeutralExtractor<ResBody> as Extractor>::Subject,
) -> Pin<Box<dyn Future<Output = KeyParts<<NeutralExtractor<ResBody> as Extractor>::Subject>> + Send + 'async_trait>>where
'life0: 'async_trait,
NeutralExtractor<ResBody>: 'async_trait,
Extract cache key components from the subject. Read more
Auto Trait Implementations§
impl<ReqBody> Freeze for NeutralExtractor<ReqBody>
impl<ReqBody> RefUnwindSafe for NeutralExtractor<ReqBody>
impl<ReqBody> Send for NeutralExtractor<ReqBody>
impl<ReqBody> Sync for NeutralExtractor<ReqBody>
impl<ReqBody> Unpin for NeutralExtractor<ReqBody>
impl<ReqBody> UnwindSafe for NeutralExtractor<ReqBody>
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