pub struct EncodingCatcher<D: Decompressor> {
pub accept_encoding: HashMap<String, Box<D>>,
}Fields§
§accept_encoding: HashMap<String, Box<D>>Implementations§
Source§impl<D: Decompressor> EncodingCatcher<D>
impl<D: Decompressor> EncodingCatcher<D>
pub fn register_decoders(decoders: Vec<D>) -> Self
Trait Implementations§
Source§impl<D: Decompressor> DeboaCatcher for EncodingCatcher<D>
impl<D: Decompressor> DeboaCatcher for EncodingCatcher<D>
Source§fn on_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut DeboaRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<DeboaResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut DeboaRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<DeboaResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This method is called before the request is sent. Please note if this method returns a response,
the request will not be sent and the response will be returned. It is advised to use bare minimum
logic here to avoid performance issues. Read more
Source§fn on_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 mut DeboaResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 mut DeboaResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This method is called after the response is received. Read more
Auto Trait Implementations§
impl<D> Freeze for EncodingCatcher<D>
impl<D> RefUnwindSafe for EncodingCatcher<D>where
D: RefUnwindSafe,
impl<D> Send for EncodingCatcher<D>
impl<D> Sync for EncodingCatcher<D>
impl<D> Unpin for EncodingCatcher<D>
impl<D> UnsafeUnpin for EncodingCatcher<D>
impl<D> UnwindSafe for EncodingCatcher<D>where
D: UnwindSafe,
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