Struct protoflow_blocks::WriteStderr
source · pub struct WriteStderr {
pub input: InputPort<Bytes>,
}Expand description
A block that writes bytes to standard error (aka stderr).
§Block Diagram
block-beta
columns 4
Source space:2 WriteStderr
Source-- "input" -->WriteStderr
classDef block height:48px,padding:8px;
classDef hidden visibility:none;
class WriteStderr block
class Source hidden
§Sequence Diagram
sequenceDiagram
autonumber
participant BlockA as Another block
participant WriteStderr.input as WriteStderr.input port
participant WriteStderr as WriteStderr block
BlockA-->>WriteStderr: Connect
loop WriteStderr process
BlockA->>WriteStderr: Message (Bytes)
WriteStderr->>WriteStderr: Write bytes to standard error
end
BlockA-->>WriteStderr: Disconnect
WriteStderr-->>WriteStderr.input: Close
§Examples
§Using the block in a system
System::build(|s| {
let stdin = s.read_stdin();
let stderr = s.write_stderr();
s.connect(&stdin.output, &stderr.input);
});§Running the block via the CLI
$ protoflow execute WriteStderr < input.txt 2> output.txt
Fields§
§input: InputPort<Bytes>The input message stream.
Implementations§
Trait Implementations§
source§impl Block for WriteStderr
impl Block for WriteStderr
source§fn execute(&mut self, runtime: &dyn BlockRuntime) -> BlockResult
fn execute(&mut self, runtime: &dyn BlockRuntime) -> BlockResult
Executes this block’s computation.
source§fn prepare(&mut self, _runtime: &dyn BlockRuntime) -> Result<(), BlockError>
fn prepare(&mut self, _runtime: &dyn BlockRuntime) -> Result<(), BlockError>
Prepares this block for execution. Read more
source§impl BlockDescriptor for WriteStderr
impl BlockDescriptor for WriteStderr
source§fn inputs(&self) -> Vec<PortDescriptor>
fn inputs(&self) -> Vec<PortDescriptor>
A description of this block’s input ports.
source§fn outputs(&self) -> Vec<PortDescriptor>
fn outputs(&self) -> Vec<PortDescriptor>
A description of this block’s output ports.
source§fn parameters(&self) -> Vec<ParameterDescriptor>
fn parameters(&self) -> Vec<ParameterDescriptor>
A description of this block’s parameters.
source§impl Clone for WriteStderr
impl Clone for WriteStderr
source§fn clone(&self) -> WriteStderr
fn clone(&self) -> WriteStderr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Definition for WriteStderr
impl Definition for WriteStderr
fn is_variation(&self) -> bool
source§impl Element for WriteStderr
impl Element for WriteStderr
source§fn short_name(&self) -> Option<&str>
fn short_name(&self) -> Option<&str>
The short name of the element, if any.
source§fn is_library_element(&self) -> bool
fn is_library_element(&self) -> bool
Whether this
Element is contained in the ownership tree of
a library model.source§fn owning_namespace(&self) -> Option<&dyn Namespace>
fn owning_namespace(&self) -> Option<&dyn Namespace>
source§fn owning_relationship(&self) -> Option<&dyn Relationship>
fn owning_relationship(&self) -> Option<&dyn Relationship>
fn qualified_name(&self) -> Option<QualifiedName>
source§impl MaybeLabeled for WriteStderr
impl MaybeLabeled for WriteStderr
source§impl MaybeNamed for WriteStderr
impl MaybeNamed for WriteStderr
source§impl Namespace for WriteStderr
impl Namespace for WriteStderr
source§impl OccurrenceDefinition for WriteStderr
impl OccurrenceDefinition for WriteStderr
fn is_individual(&self) -> bool
source§impl StdioSystem for WriteStderr
impl StdioSystem for WriteStderr
fn build_system(_config: StdioConfig) -> Result<System, StdioError>
source§impl Type for WriteStderr
impl Type for WriteStderr
fn is_abstract(&self) -> bool
fn is_sufficient(&self) -> bool
fn is_conjugated(&self) -> bool
fn specializes(&self, _supertype: &Self) -> bool
impl BlockDefinition for WriteStderr
impl Class for WriteStderr
impl Classifier for WriteStderr
impl ItemDefinition for WriteStderr
impl PartDefinition for WriteStderr
impl Structure for WriteStderr
Auto Trait Implementations§
impl Freeze for WriteStderr
impl !RefUnwindSafe for WriteStderr
impl Send for WriteStderr
impl Sync for WriteStderr
impl Unpin for WriteStderr
impl !UnwindSafe for WriteStderr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)