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§
sourcefn optional<T>(
self,
middleware: Option<T>,
) -> ServiceBuilder<Stack<OptionLayer<T>, S>>
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.