Trait protoflow_blocks::SystemBuilding

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

Required Methods§

source

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

Creates a new input port inside the system.

source

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

Creates a new output port inside the system.

source

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

Instantiates a block inside the system.

source

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

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§

source§

impl SystemBuilding for protoflow_core::system::System

source§

impl SystemBuilding for protoflow_blocks::System