Trait Layer

Source
pub trait Layer<R> {
    type Output;

    // Required method
    fn layer(&self, inner: R) -> Self::Output;
}
Expand description

Decorates an object by wrapping it within another type.

Required Associated Types§

Source

type Output

The output type after wrapping.

Required Methods§

Source

fn layer(&self, inner: R) -> Self::Output

Wraps inner based on this layer.

Implementors§

Source§

impl<R> Layer<R> for PrefixLayer

Source§

impl<R> Layer<R> for Identity

Source§

impl<R, H, T> Layer<R> for Stack<H, T>
where H: Layer<<T as Layer<R>>::Output>, T: Layer<R>,

Source§

type Output = <H as Layer<<T as Layer<R>>::Output>>::Output