pub struct System<X = MpscTransport>{ /* private fields */ }Expand description
A system is a collection of blocks that are connected together.
Implementations§
Source§impl<X> System<X>
impl<X> System<X>
Sourcepub fn new(runtime: &Arc<StdRuntime<X>>) -> System<X>
pub fn new(runtime: &Arc<StdRuntime<X>>) -> System<X>
Instantiates a new system.
pub fn execute(self) -> Result<Rc<dyn Process>, BlockError>
pub fn input<M>(&self) -> InputPort<M>where
M: Message + 'static,
pub fn output<M>(&self) -> OutputPort<M>where
M: Message + 'static,
pub fn block<B>(&mut self, block: B) -> B
pub fn connect<M>(&self, source: &OutputPort<M>, target: &InputPort<M>) -> boolwhere
M: Message,
Trait Implementations§
Source§impl SystemBuilding for System
impl SystemBuilding for System
Source§fn input<M>(&self) -> InputPort<M>where
M: Message + 'static,
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,
fn output<M>(&self) -> OutputPort<M>where
M: Message + 'static,
Creates a new output port inside the system.
Source§fn connect<M>(&mut self, source: &OutputPort<M>, target: &InputPort<M>) -> boolwhere
M: Message,
fn connect<M>(&mut self, source: &OutputPort<M>, target: &InputPort<M>) -> boolwhere
M: Message,
Connects two ports of two blocks in the system. Read more
fn input_any(&self) -> InputPort<Any>
fn input_bytes(&self) -> InputPort<Bytes>
fn input_string(&self) -> InputPort<String>
fn output_any(&self) -> OutputPort<Any>
fn output_bytes(&self) -> OutputPort<Bytes>
fn output_string(&self) -> OutputPort<String>
Auto Trait Implementations§
impl<X> Freeze for System<X>
impl<X = MpscTransport> !RefUnwindSafe for System<X>
impl<X> Send for System<X>
impl<X> 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