pub struct UserAgentMiddleware { /* private fields */ }Expand description
Middleware that sets the User-Agent header on outgoing requests.
Implementations§
Trait Implementations§
Source§impl Middleware for UserAgentMiddleware
impl Middleware for UserAgentMiddleware
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: HttpRequest,
chain: &'life1 MiddlewareChain,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: HttpRequest,
chain: &'life1 MiddlewareChain,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handles a request, potentially passing it through the chain.
Auto Trait Implementations§
impl Freeze for UserAgentMiddleware
impl RefUnwindSafe for UserAgentMiddleware
impl Send for UserAgentMiddleware
impl Sync for UserAgentMiddleware
impl Unpin for UserAgentMiddleware
impl UnsafeUnpin for UserAgentMiddleware
impl UnwindSafe for UserAgentMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more