[−][src]Struct roa::compress::Compress
A middleware to negotiate with client and compress response body automatically, supports gzip, deflate, brotli, zstd and identity.
Trait Implementations
impl Clone for Compress
[src]
impl Copy for Compress
[src]
impl Debug for Compress
[src]
impl Default for Compress
[src]
impl<S: State> Middleware<S> for Compress
[src]
fn handle<'async_trait>(
self: Arc<Self>,
ctx: Context<S>,
next: Next
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self: Arc<Self>,
ctx: Context<S>,
next: Next
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
Self: 'async_trait,
fn end<'async_trait>(
self: Arc<Self>,
ctx: Context<S>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
Self: 'async_trait,
[src]
self: Arc<Self>,
ctx: Context<S>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for Compress
impl Send for Compress
impl Sync for Compress
impl Unpin for Compress
impl UnwindSafe for Compress
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S, F, T> Middleware<S> for T where
F: 'static + Future<Output = Result<(), Error>> + Send,
S: State,
T: 'static + Sync + Send + Fn(Context<S>, Box<dyn FnOnce() + 'static + Sync + Send>) -> F,
[src]
F: 'static + Future<Output = Result<(), Error>> + Send,
S: State,
T: 'static + Sync + Send + Fn(Context<S>, Box<dyn FnOnce() + 'static + Sync + Send>) -> F,
fn handle<'async_trait>(
self: Arc<T>,
ctx: Context<S>,
next: Box<dyn FnOnce() + 'static + Sync + Send>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
T: 'async_trait,
[src]
self: Arc<T>,
ctx: Context<S>,
next: Box<dyn FnOnce() + 'static + Sync + Send>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
T: 'async_trait,
fn end<'async_trait>(
self: Arc<Self>,
ctx: Context<S>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
Self: 'async_trait,
[src]
self: Arc<Self>,
ctx: Context<S>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
Self: 'async_trait,
impl<T> State for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,