Struct MakeAddContext

Source
pub struct MakeAddContext<T, A> { /* private fields */ }

Implementations§

Source§

impl<T, A, B, C, D> MakeAddContext<T, A>
where A: Default + Push<XSpanIdString, Result = B>, B: Push<Option<AuthData>, Result = C>, C: Push<Option<Authorization>, Result = D>,

Source

pub fn new(inner: T) -> MakeAddContext<T, A>

Trait Implementations§

Source§

impl<'a, T, SC, A, B, C, D, E, ME, S, OB, F> MakeService<&'a SC> for MakeAddContext<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: MakeService<&'a SC, Error = E, MakeError = ME, Service = S, ReqBody = ContextualPayload<Body, D>, ResBody = OB, Future = F>, S: Service<Error = E, ReqBody = ContextualPayload<Body, D>, ResBody = OB> + 'static, ME: ErrorBound, E: ErrorBound, F: Future<Item = S, Error = ME> + Send + 'static, S::Future: Send, OB: Payload,

Source§

type ReqBody = Body

The Payload body of the http::Request.
Source§

type ResBody = OB

The Payload body of the http::Response.
Source§

type Error = E

The error type that can be returned by Services.
Source§

type MakeError = ME

The error type that can be returned when creating a new Service.
Source§

type Service = AddContext<S, A>

The resolved Service from new_service().
Source§

type Future = Box<dyn Future<Item = <MakeAddContext<T, A> as MakeService<&'a SC>>::Service, Error = ME> + Send>

The future returned from new_service of a Service.
Source§

fn make_service(&mut self, ctx: &'a SC) -> Self::Future

Create a new Service.
Source§

fn poll_ready(&mut self) -> Result<Async<()>, Self::MakeError>

Returns Ready when the constructor is ready to create a new Service. Read more

Auto Trait Implementations§

§

impl<T, A> Freeze for MakeAddContext<T, A>
where T: Freeze,

§

impl<T, A> RefUnwindSafe for MakeAddContext<T, A>

§

impl<T, A> Send for MakeAddContext<T, A>
where T: Send, A: Send,

§

impl<T, A> Sync for MakeAddContext<T, A>
where T: Sync, A: Sync,

§

impl<T, A> Unpin for MakeAddContext<T, A>
where T: Unpin, A: Unpin,

§

impl<T, A> UnwindSafe for MakeAddContext<T, A>
where T: UnwindSafe, A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.