Struct protoflow_blocks::System
source · 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>(&self) -> Buffer<T>
fn const_string(&self, value: impl ToString) -> Const<String>
fn count<T: Message + 'static>(&self) -> Count<T>
fn delay<T: Message + 'static>(&self) -> Delay<T>
fn delay_by<T: Message + 'static>(&self, delay: DelayType) -> Delay<T>
fn drop<T: Message + 'static>(&self) -> Drop<T>
fn random<T: Message + 'static>(&self) -> Random<T>
fn random_seeded<T: Message + 'static>(&self, seed: Option<u64>) -> Random<T>
fn delay_by_fixed<T: Message + 'static>(&self, delay: Duration) -> Delay<T>
fn delay_by_random<T: Message + 'static>( &self, delay: Range<Duration>, ) -> Delay<T>
source§impl HashBlocks for System
impl HashBlocks for System
fn hash_blake3(&self) -> Hash
source§impl IoBlocks for System
impl IoBlocks for System
fn decode<T: Message + FromStr + 'static>(&self) -> Decode<T>
fn decode_with<T: Message + FromStr + 'static>( &self, encoding: Encoding, ) -> Decode<T>
fn encode<T: Message + ToString + 'static>(&self) -> Encode<T>
fn encode_with<T: Message + ToString + 'static>( &self, encoding: Encoding, ) -> Encode<T>
fn encode_hex(&self) -> EncodeHex
fn decode_lines<T: Message + FromStr + 'static>(&self) -> Decode<T>
fn encode_lines<T: Message + ToString + 'static>(&self) -> Encode<T>
source§impl SysBlocks for System
impl SysBlocks for System
fn read_dir(&self) -> ReadDir
fn read_env(&self) -> ReadEnv
fn read_file(&self) -> ReadFile
fn read_stdin(&self) -> ReadStdin
fn write_file(&self) -> WriteFile
fn write_stderr(&self) -> WriteStderr
fn write_stdout(&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§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