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

§

type Output = Prefix<R>

source§

impl<R> Layer<R> for Identity

§

type Output = R

source§

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

§

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