[][src]Struct roa::compress::Compress

pub struct Compress(pub Level);

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

impl<T> State for T where
    T: 'static + Send + Sync
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.