Skip to main content

Node

Trait Node 

Source
pub trait Node: Default {
    type In: In;
    type Out: Out;
    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<'py>(
        &self,
        kwargs: Kwargs<'py>,
    ) -> Result<Self::In, <Self::In as TryFrom<Kwargs<'py>>>::Error> { ... }
}

Required Associated Types§

Source

type In: In

Source

type Out: Out

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<'py>( &self, kwargs: Kwargs<'py>, ) -> Result<Self::In, <Self::In as TryFrom<Kwargs<'py>>>::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§