[−][src]Struct i2cbus_api::context::AddContext
Middleware to extract authentication data from request
Implementations
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,
[src]
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>
[src]
Trait Implementations
impl<T, A, B, C, D> Service for AddContext<T, A> where
A: Default + Push<XSpanIdString, Result = B>,
B: Push<Option<AuthData>, Result = C>,
C: Push<Option<Authorization>, Result = D>,
D: Send + 'static,
T: Service<ReqBody = ContextualPayload<Body, D>>,
T::Future: Future<Item = Response<T::ResBody>, Error = T::Error> + Send + 'static,
[src]
A: Default + Push<XSpanIdString, Result = B>,
B: Push<Option<AuthData>, Result = C>,
C: Push<Option<Authorization>, Result = D>,
D: Send + 'static,
T: Service<ReqBody = ContextualPayload<Body, D>>,
T::Future: Future<Item = Response<T::ResBody>, Error = T::Error> + Send + 'static,
type ReqBody = Body
The Payload
body of the http::Request
.
type ResBody = T::ResBody
The Payload
body of the http::Response
.
type Error = T::Error
The error type that can occur within this Service
. Read more
type Future = Box<dyn Future<Item = Response<T::ResBody>, Error = T::Error> + Send + 'static>
The Future
returned by this Service
.
fn call(&mut self, req: Request<Self::ReqBody>) -> Self::Future
[src]
fn poll_ready(&mut self) -> Result<Async<()>, Self::Error>
[src]
Auto Trait Implementations
impl<T, A> RefUnwindSafe for AddContext<T, A> where
A: RefUnwindSafe,
T: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Send for AddContext<T, A> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<T, A> Sync for AddContext<T, A> where
A: Sync,
T: Sync,
A: Sync,
T: Sync,
impl<T, A> Unpin for AddContext<T, A> where
A: Unpin,
T: Unpin,
A: Unpin,
T: Unpin,
impl<T, A> UnwindSafe for AddContext<T, A> where
A: UnwindSafe,
T: UnwindSafe,
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,