Struct LayerFn

pub struct LayerFn<F> { /* private fields */ }

A Layer implemented by a closure. See the docs for layer_fn for more details.

Trait Implementations

impl<F> Debug for LayerFn<F>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<F, S, Out> Layer<S> for LayerFn<F> where F: Fn(S) -> Out,

type Service = Out;
fn layer(&self, inner: S) -> Self::Service

impl<F: Clone> Clone for LayerFn<F>

fn clone(&self) -> Self

impl<F: Copy> Copy for LayerFn<F>

Auto Trait Implementations

impl<F> Freeze for LayerFn<F> where F: Freeze,

impl<F> RefUnwindSafe for LayerFn<F> where F: RefUnwindSafe,

impl<F> Send for LayerFn<F> where F: Send,

impl<F> Sync for LayerFn<F> where F: Sync,

impl<F> Unpin for LayerFn<F> where F: Unpin,

impl<F> UnsafeUnpin for LayerFn<F> where F: UnsafeUnpin,

impl<F> UnwindSafe for LayerFn<F> where F: UnwindSafe,

Blanket Implementations

impl<T> Any for LayerFn<F> where T: 'static + ?Sized,

impl<T> Borrow<T> for LayerFn<F> where T: ?Sized,

impl<T> BorrowMut<T> for LayerFn<F> where T: ?Sized,

impl<T> CloneToUninit for LayerFn<F> where T: Clone,

impl<T> From<T> for LayerFn<F>

impl<T> ToOwned for LayerFn<F> where T: Clone,

impl<T, U> Into<U> for LayerFn<F> where U: From<T>,

impl<T, U> TryFrom<U> for LayerFn<F> where U: Into<T>,

impl<T, U> TryInto<U> for LayerFn<F> where U: TryFrom<T>,