pub struct InterceptorHandler { /* private fields */ }Expand description
Combined interceptor handler for both HTTP and TCP traffic
Implementations§
Source§impl InterceptorHandler
impl InterceptorHandler
Sourcepub fn add_request_interceptor(
&mut self,
interceptor: Arc<dyn RequestInterceptor>,
)
pub fn add_request_interceptor( &mut self, interceptor: Arc<dyn RequestInterceptor>, )
Add a request interceptor
Sourcepub fn add_response_interceptor(
&mut self,
interceptor: Arc<dyn ResponseInterceptor>,
)
pub fn add_response_interceptor( &mut self, interceptor: Arc<dyn ResponseInterceptor>, )
Add a response interceptor
Sourcepub async fn process_request(
&self,
request: MitmRequest,
) -> Result<Option<MitmRequest>>
pub async fn process_request( &self, request: MitmRequest, ) -> Result<Option<MitmRequest>>
Process a request through all interceptors
Sourcepub async fn process_response(
&self,
response: MitmResponse,
) -> Result<Option<MitmResponse>>
pub async fn process_response( &self, response: MitmResponse, ) -> Result<Option<MitmResponse>>
Process a response through all interceptors
Sourcepub fn has_interceptors(&self) -> bool
pub fn has_interceptors(&self) -> bool
Check if any interceptors are registered
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InterceptorHandler
impl !RefUnwindSafe for InterceptorHandler
impl Send for InterceptorHandler
impl Sync for InterceptorHandler
impl Unpin for InterceptorHandler
impl !UnwindSafe for InterceptorHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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