[−][src]Struct tower_request_modifier::RequestModifier
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]
inner: T,
modifiers: Arc<Vec<Box<dyn Fn(Request<B>) -> Request<B> + Send + Sync>>>
) -> Self
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]
T: Clone,
fn clone(&self) -> Self
[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]
T: Service<Request<B>>,
Auto Trait Implementations
impl<T, B> Send for RequestModifier<T, B> where
T: Send,
T: Send,
impl<T, B> Unpin for RequestModifier<T, B> where
T: Unpin,
T: Unpin,
impl<T, B> Sync for RequestModifier<T, B> where
T: Sync,
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,