Struct AddExtension

struct AddExtension<S, T> { ... }

Middleware for adding some shareable value to request extensions.

See Passing state from middleware to handlers for more details.

Implementations

impl<M, S, Target, Request> MakeService for AddExtension<S, T>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future

impl<ResBody, S, T> Service for AddExtension<S, T>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
fn call(self: &mut Self, req: Request<ResBody>) -> <Self as >::Future

impl<S, R> ServiceExt for AddExtension<S, T>

fn into_make_service(self: Self) -> IntoMakeService<S>
fn into_make_service_with_connect_info<C>(self: Self) -> IntoMakeServiceWithConnectInfo<S, C>

impl<S, T> Freeze for AddExtension<S, T>

impl<S, T> RefUnwindSafe for AddExtension<S, T>

impl<S, T> Send for AddExtension<S, T>

impl<S, T> Sync for AddExtension<S, T>

impl<S, T> Unpin for AddExtension<S, T>

impl<S, T> UnsafeUnpin for AddExtension<S, T>

impl<S, T> UnwindSafe for AddExtension<S, T>

impl<S: $crate::clone::Clone, T: $crate::clone::Clone> Clone for AddExtension<S, T>

fn clone(self: &Self) -> AddExtension<S, T>

impl<S: $crate::fmt::Debug, T: $crate::fmt::Debug> Debug for AddExtension<S, T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<S: $crate::marker::Copy, T: $crate::marker::Copy> Copy for AddExtension<S, T>

impl<T> Any for AddExtension<S, T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for AddExtension<S, T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for AddExtension<S, T>

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

impl<T> CloneToUninit for AddExtension<S, T>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for AddExtension<S, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FromRef for AddExtension<S, T>

fn from_ref(input: &T) -> T

impl<T> Instrument for AddExtension<S, T>

impl<T> Same for AddExtension<S, T>

impl<T> ToOwned for AddExtension<S, T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for AddExtension<S, T>

impl<T, Request> ServiceExt for AddExtension<S, T>

impl<T, U> Into for AddExtension<S, T>

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for AddExtension<S, T>

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

impl<T, U> TryInto for AddExtension<S, T>

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

impl<V, T> VZip for AddExtension<S, T>

fn vzip(self: Self) -> V