Trait protoflow_core::SystemBuilding

source ·
pub trait SystemBuilding {
    // Required methods
    fn input<M: Message + 'static>(&self) -> InputPort<M>;
    fn output<M: Message + 'static>(&self) -> OutputPort<M>;
    fn block<B: Block + Clone + 'static>(&self, block: B) -> B;
    fn connect<M: Message>(
        &self,
        source: &OutputPort<M>,
        target: &InputPort<M>,
    ) -> bool;
}

Required Methods§

source

fn input<M: Message + 'static>(&self) -> InputPort<M>

Creates a new input port inside the system.

source

fn output<M: Message + 'static>(&self) -> OutputPort<M>

Creates a new output port inside the system.

source

fn block<B: Block + Clone + 'static>(&self, block: B) -> B

Instantiates a block inside the system.

source

fn connect<M: Message>( &self, source: &OutputPort<M>, target: &InputPort<M>, ) -> bool

Connects two ports of two blocks in the system.

Both ports must be of the same message type.

Object Safety§

This trait is not object safe.

Implementors§