pub struct UserAgentMiddleware { /* private fields */ }Implementations§
Source§impl UserAgentMiddleware
impl UserAgentMiddleware
pub fn new(user_agent: &str) -> Result<Self, SpiderError>
Trait Implementations§
Source§impl Middleware for UserAgentMiddleware
impl Middleware for UserAgentMiddleware
fn process_request<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Request, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_response<'life0, 'async_trait>(
&'life0 self,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<Response, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for UserAgentMiddleware
impl RefUnwindSafe for UserAgentMiddleware
impl Send for UserAgentMiddleware
impl Sync for UserAgentMiddleware
impl Unpin 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