pub struct TimeoutFilter { /* private fields */ }
Expand description
A filter that enforces request timeouts.
Implementations§
Source§impl TimeoutFilter
impl TimeoutFilter
Sourcepub fn new(config: TimeoutFilterConfig) -> Self
pub fn new(config: TimeoutFilterConfig) -> Self
Create a new timeout filter with the given configuration.
Trait Implementations§
Source§impl Debug for TimeoutFilter
impl Debug for TimeoutFilter
Source§impl Default for TimeoutFilter
impl Default for TimeoutFilter
Source§impl Filter for TimeoutFilter
impl Filter for TimeoutFilter
Source§fn filter_type(&self) -> FilterType
fn filter_type(&self) -> FilterType
Get the filter type.
Source§fn pre_filter<'life0, 'async_trait>(
&'life0 self,
request: ProxyRequest,
) -> Pin<Box<dyn Future<Output = Result<ProxyRequest, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pre_filter<'life0, 'async_trait>(
&'life0 self,
request: ProxyRequest,
) -> Pin<Box<dyn Future<Output = Result<ProxyRequest, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a request before it is sent to the target.
Source§fn post_filter<'life0, 'async_trait>(
&'life0 self,
_request: ProxyRequest,
response: ProxyResponse,
) -> Pin<Box<dyn Future<Output = Result<ProxyResponse, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn post_filter<'life0, 'async_trait>(
&'life0 self,
_request: ProxyRequest,
response: ProxyResponse,
) -> Pin<Box<dyn Future<Output = Result<ProxyResponse, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a response after it is received from the target.
Auto Trait Implementations§
impl Freeze for TimeoutFilter
impl RefUnwindSafe for TimeoutFilter
impl Send for TimeoutFilter
impl Sync for TimeoutFilter
impl Unpin for TimeoutFilter
impl UnwindSafe for TimeoutFilter
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