Skip to main content

LayerExt

Trait LayerExt 

pub trait LayerExt<L>: Sealed {
    // Required method
    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
       where L: Layer<S>;
}
Available on crate features grpc and http only.
Expand description

Extension trait which adds utility methods to types which implement Layer.

Required Methods§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<L> LayerExt<L> for L