[−][src]Struct tower_request_modifier::Builder
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]
HeaderName: HttpTryFrom<T>,
HeaderValue: HttpTryFrom<R>,
Set a header on all requests.
pub fn set_origin<T>(self, uri: T) -> Self where
Uri: HttpTryFrom<T>,
[src]
Uri: HttpTryFrom<T>,
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]
self,
modifier: Box<dyn Fn(Request<B>) -> Request<B> + Send + Sync>
) -> Self
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
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]
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,