pub struct System(/* private fields */);Implementations§
Source§impl System
impl System
Sourcepub fn run<F: FnOnce(&mut System)>(f: F) -> BlockResult
pub fn run<F: FnOnce(&mut System)>(f: F) -> BlockResult
Builds and executes a system, blocking until completion.
Sourcepub fn spawn<F: FnOnce(&mut System)>(f: F) -> BlockResult<Rc<dyn Process>>
pub fn spawn<F: FnOnce(&mut System)>(f: F) -> BlockResult<Rc<dyn Process>>
Builds and executes a system, returning immediately.
Sourcepub fn new(runtime: &Arc<StdRuntime<MpscTransport>>) -> Self
pub fn new(runtime: &Arc<StdRuntime<MpscTransport>>) -> Self
Instantiates a new system.
Trait Implementations§
Source§impl CoreBlocks for System
impl CoreBlocks for System
fn buffer<T: Message + Into<T> + 'static>(&mut self) -> Buffer<T>
fn const_string(&mut self, value: impl ToString) -> Const<String>
fn count<T: Message + 'static>(&mut self) -> Count<T>
fn delay<T: Message + 'static>(&mut self) -> Delay<T>
fn delay_by<T: Message + 'static>(&mut self, delay: DelayType) -> Delay<T>
fn drop<T: Message + 'static>(&mut self) -> Drop<T>
fn random<T: Message + 'static>(&mut self) -> Random<T>
fn random_seeded<T: Message + 'static>( &mut self, seed: Option<u64>, ) -> Random<T>
fn delay_by_fixed<T: Message + 'static>(&mut self, delay: Duration) -> Delay<T>
fn delay_by_random<T: Message + 'static>( &mut self, delay: Range<Duration>, ) -> Delay<T>
Source§impl HashBlocks for System
impl HashBlocks for System
fn hash_blake3(&mut self) -> Hash
Source§impl IoBlocks for System
impl IoBlocks for System
fn decode<T: Message + FromStr + 'static>(&mut self) -> Decode<T>
fn decode_json(&mut self) -> DecodeJson
fn decode_with<T: Message + FromStr + 'static>( &mut self, encoding: Encoding, ) -> Decode<T>
fn encode<T: Message + ToString + 'static>(&mut self) -> Encode<T>
fn encode_with<T: Message + ToString + 'static>( &mut self, encoding: Encoding, ) -> Encode<T>
fn encode_hex(&mut self) -> EncodeHex
fn encode_json(&mut self) -> EncodeJson
fn decode_lines<T: Message + FromStr + 'static>(&mut self) -> Decode<T>
fn encode_lines<T: Message + ToString + 'static>(&mut self) -> Encode<T>
Source§impl SysBlocks for System
impl SysBlocks for System
fn read_dir(&mut self) -> ReadDir
fn read_env(&mut self) -> ReadEnv
fn read_file(&mut self) -> ReadFile
fn read_stdin(&mut self) -> ReadStdin
fn write_file(&mut self) -> WriteFile
fn write_stderr(&mut self) -> WriteStderr
fn write_stdout(&mut self) -> WriteStdout
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§fn block<B: Block + Clone + 'static>(&mut self, block: B) -> B
fn block<B: Block + Clone + 'static>(&mut self, block: B) -> B
Instantiates a block inside the system.
Source§fn connect<M: Message>(
&mut self,
source: &OutputPort<M>,
target: &InputPort<M>,
) -> bool
fn connect<M: Message>( &mut self, source: &OutputPort<M>, target: &InputPort<M>, ) -> bool
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>
Source§impl SystemExecution for System
impl SystemExecution for System
impl AllBlocks for System
impl FlowBlocks for System
impl MathBlocks for System
impl TextBlocks for System
Auto Trait Implementations§
impl Freeze for System
impl !RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl !UnwindSafe for System
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