Struct protoflow_core::System
source · pub struct System<X: Transport + Default + 'static = MpscTransport> { /* private fields */ }
Expand description
A system is a collection of blocks that are connected together.
Implementations§
source§impl<X: Transport + Default + 'static> System<X>
impl<X: Transport + Default + 'static> System<X>
sourcepub fn new(runtime: &Arc<StdRuntime<X>>) -> Self
pub fn new(runtime: &Arc<StdRuntime<X>>) -> Self
Instantiates a new system.
pub fn execute(self) -> BlockResult<Rc<dyn Process>>
pub fn input<M: Message + 'static>(&self) -> InputPort<M>
pub fn output<M: Message + 'static>(&self) -> OutputPort<M>
pub fn block<B: Block + Clone + 'static>(&self, block: B) -> B
pub fn connect<M: Message>( &self, source: &OutputPort<M>, target: &InputPort<M>, ) -> bool
Trait Implementations§
source§impl SystemBuilding for System
impl SystemBuilding for System
source§fn input<M: Message + 'static>(&self) -> InputPort<M>
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>
fn output<M: Message + 'static>(&self) -> OutputPort<M>
Creates a new output port inside the system.
source§impl SystemExecution for System
impl SystemExecution for System
Auto Trait Implementations§
impl<X = MpscTransport> !Freeze for System<X>
impl<X = MpscTransport> !RefUnwindSafe for System<X>
impl<X> Send for System<X>
impl<X = MpscTransport> !Sync for System<X>
impl<X> Unpin for System<X>where
X: Unpin,
impl<X = MpscTransport> !UnwindSafe for System<X>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more