pub struct AddContext<T, A> { /* private fields */ }
Expand description
Middleware to extract authentication data from request
Implementations§
Source§impl<T, A, B, C, D> AddContext<T, A>where
A: Default + Push<XSpanIdString, Result = B>,
B: Push<Option<AuthData>, Result = C>,
C: Push<Option<Authorization>, Result = D>,
T: Service,
impl<T, A, B, C, D> AddContext<T, A>where
A: Default + Push<XSpanIdString, Result = B>,
B: Push<Option<AuthData>, Result = C>,
C: Push<Option<Authorization>, Result = D>,
T: Service,
pub fn new(inner: T) -> AddContext<T, A>
Trait Implementations§
Source§impl<T, A, B, C, D> Service for AddContext<T, A>
impl<T, A, B, C, D> Service for AddContext<T, A>
Source§type Error = <T as Service>::Error
type Error = <T as Service>::Error
The error type that can occur within this
Service
. Read moreSource§type Future = Box<dyn Future<Item = Response<<T as Service>::ResBody>, Error = <T as Service>::Error> + Send>
type Future = Box<dyn Future<Item = Response<<T as Service>::ResBody>, Error = <T as Service>::Error> + Send>
The
Future
returned by this Service
.Auto Trait Implementations§
impl<T, A> Freeze for AddContext<T, A>where
T: Freeze,
impl<T, A> RefUnwindSafe for AddContext<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Send for AddContext<T, A>
impl<T, A> Sync for AddContext<T, A>
impl<T, A> Unpin for AddContext<T, A>
impl<T, A> UnwindSafe for AddContext<T, A>where
T: UnwindSafe,
A: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more