Node

Trait Node 

Source
pub trait Node<'a>: Default {
    type In: In<'a>;
    type Out: Out<'a>;
    type Error: Into<Box<dyn Error + Send + Sync>> + 'static;

    // Required method
    fn execute(&self, input: Self::In) -> Result<Self::Out, Self::Error>;

    // Provided methods
    fn new() -> Self { ... }
    fn initialize_inputs(
        &self,
        kwargs: Kwargs<'a>,
    ) -> Result<Self::In, <Self::In as TryFrom<Kwargs<'a>>>::Error> { ... }
}

Required Associated Types§

Source

type In: In<'a>

Source

type Out: Out<'a>

Source

type Error: Into<Box<dyn Error + Send + Sync>> + 'static

Required Methods§

Source

fn execute(&self, input: Self::In) -> Result<Self::Out, Self::Error>

Provided Methods§

Source

fn new() -> Self

Source

fn initialize_inputs( &self, kwargs: Kwargs<'a>, ) -> Result<Self::In, <Self::In as TryFrom<Kwargs<'a>>>::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§