pub struct PathRewriteFilter { /* private fields */ }Expand description
A filter that rewrites request and response paths based on regex patterns.
Implementations§
Source§impl PathRewriteFilter
impl PathRewriteFilter
Sourcepub fn new(config: PathRewriteFilterConfig) -> Result<Self, ProxyError>
pub fn new(config: PathRewriteFilterConfig) -> Result<Self, ProxyError>
Create a new path rewrite filter with the given configuration.
Sourcepub fn with_defaults() -> Result<Self, ProxyError>
pub fn with_defaults() -> Result<Self, ProxyError>
Create a new path rewrite filter with default configuration.
Trait Implementations§
Source§impl Debug for PathRewriteFilter
impl Debug for PathRewriteFilter
Source§impl Filter for PathRewriteFilter
impl Filter for PathRewriteFilter
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 PathRewriteFilter
impl RefUnwindSafe for PathRewriteFilter
impl Send for PathRewriteFilter
impl Sync for PathRewriteFilter
impl Unpin for PathRewriteFilter
impl UnwindSafe for PathRewriteFilter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more