Dos

Trait Dos 

Source
pub trait Dos {
    type Input;
    type Output;

    // Required methods
    fn outputs(&mut self) -> Option<Vec<IO<Self::Output>>>;
    fn inputs(
        &mut self,
        data: Option<Vec<IO<Self::Input>>>,
    ) -> Result<&mut Self, DOSIOSError>;

    // Provided methods
    fn step(&mut self) -> Result<&mut Self, DOSIOSError>
       where Self: Sized + Iterator { ... }
    fn in_step_out(
        &mut self,
        data: Option<Vec<IO<Self::Input>>>,
    ) -> Result<Option<Vec<IO<Self::Output>>>, DOSIOSError>
       where Self: Sized + Iterator { ... }
}
Expand description

Dynamic Optics Simulation interface

Required Associated Types§

Source

type Input

Self inputs type

Source

type Output

Self outputs type

Required Methods§

Source

fn outputs(&mut self) -> Option<Vec<IO<Self::Output>>>

Returns a IO output vector from Self

Source

fn inputs( &mut self, data: Option<Vec<IO<Self::Input>>>, ) -> Result<&mut Self, DOSIOSError>

Passe a IO input vector to Self

Provided Methods§

Source

fn step(&mut self) -> Result<&mut Self, DOSIOSError>
where Self: Sized + Iterator,

Invokes the next method of Self

Source

fn in_step_out( &mut self, data: Option<Vec<IO<Self::Input>>>, ) -> Result<Option<Vec<IO<Self::Output>>>, DOSIOSError>
where Self: Sized + Iterator,

Combines inputs, step and outputs in a single method

This is equivalent to .inputs(...)?.step()?.outputs()?

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§