Trait hyperdriver::service::OptionLayerExt

source ·
pub trait OptionLayerExt<S> {
    // Required method
    fn optional<T>(
        self,
        middleware: Option<T>,
    ) -> ServiceBuilder<Stack<OptionLayer<T>, S>>;
}
Expand description

Extends ServiceBuilder with an optional method.

Required Methods§

source

fn optional<T>( self, middleware: Option<T>, ) -> ServiceBuilder<Stack<OptionLayer<T>, S>>

Apply an optional middleware to the service, with a consistent concrete error type.

Object Safety§

This trait is not object safe.

Implementors§