[][src]Struct tower_request_modifier::RequestModifier

pub struct RequestModifier<T, B> { /* fields omitted */ }

Wraps an HTTP service, injecting authority and scheme on every request.

Methods

impl<T, B> RequestModifier<T, B>[src]

pub fn new(
    inner: T,
    modifiers: Arc<Vec<Box<dyn Fn(Request<B>) -> Request<B> + Send + Sync>>>
) -> Self
[src]

Create a new RequestModifier

pub fn get_ref(&self) -> &T[src]

Returns a reference to the inner service.

pub fn get_mut(&mut self) -> &mut T[src]

Returns a mutable reference to the inner service.

pub fn into_inner(self) -> T[src]

Consumes self, returning the inner service.

Trait Implementations

impl<T, B> Clone for RequestModifier<T, B> where
    T: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T, B> Debug for RequestModifier<T, B>[src]

impl<T, B> Service<Request<B>> for RequestModifier<T, B> where
    T: Service<Request<B>>, 
[src]

type Response = T::Response

Responses given by the service.

type Error = T::Error

Errors produced by the service.

type Future = T::Future

The future response value.

Auto Trait Implementations

impl<T, B> Send for RequestModifier<T, B> where
    T: Send

impl<T, B> Unpin for RequestModifier<T, B> where
    T: Unpin

impl<T, B> Sync for RequestModifier<T, B> where
    T: Sync

impl<T, B> !UnwindSafe for RequestModifier<T, B>

impl<T, B> !RefUnwindSafe for RequestModifier<T, B>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]