[][src]Struct tower_request_modifier::Builder

pub struct Builder<B> { /* fields omitted */ }

Configure an RequestModifier instance

Methods

impl<B> Builder<B>[src]

pub fn new() -> Self[src]

Return a new, default builder

pub fn add_header<T: ToString, R>(self, name: T, val: R) -> Self where
    HeaderName: HttpTryFrom<T>,
    HeaderValue: HttpTryFrom<R>, 
[src]

Set a header on all requests.

pub fn set_origin<T>(self, uri: T) -> Self where
    Uri: HttpTryFrom<T>, 
[src]

Set the URI to use as the origin for all requests.

pub fn add_modifier(
    self,
    modifier: Box<dyn Fn(Request<B>) -> Request<B> + Send + Sync>
) -> Self
[src]

Run an arbitrary modifier on all requests

pub fn build<T>(self, inner: T) -> Result<RequestModifier<T, B>, BuilderError>[src]

Build the RequestModifier from the provided settings.

Trait Implementations

impl<B> Default for Builder<B>[src]

impl<B> Debug for Builder<B>[src]

Auto Trait Implementations

impl<B> Send for Builder<B>

impl<B> Unpin for Builder<B>

impl<B> Sync for Builder<B>

impl<B> !UnwindSafe for Builder<B>

impl<B> !RefUnwindSafe for Builder<B>

Blanket Implementations

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]