Skip to main content

LayerFrom

Trait LayerFrom 

Source
pub trait LayerFrom<I: ?Sized> {
    type Output;
    type Error;

    // Required method
    fn build(&self, input: &I) -> Result<Self::Output, Self::Error>;
}
Expand description

Build an extra cell from a reference to the output of a previous layer.

Required Associated Types§

Source

type Output

Value produced from input when LayerFrom::build succeeds.

Source

type Error

Error type when LayerFrom::build fails.

Required Methods§

Source

fn build(&self, input: &I) -> Result<Self::Output, Self::Error>

Builds using a shared borrow of the upstream layer’s output.

Implementors§

Source§

impl<I: ?Sized, O, E, F> LayerFrom<I> for LayerFnFrom<F>
where F: Fn(&I) -> Result<O, E>,

Source§

type Output = O

Source§

type Error = E