Trait Broadcast

Source
pub trait Broadcast {
    // Required method
    fn outputs_mut(&mut self) -> OutputIterator<'_>;

    // Provided methods
    fn broadcast_open(&mut self) { ... }
    fn broadcast_close(&mut self) { ... }
    fn broadcast_done(&mut self) { ... }
    fn broadcast_err(&mut self, err: impl Into<String>) { ... }
}
Expand description

Trait for operation outputs to handle situations where packets need to be sent to all output streams.

Required Methods§

Source

fn outputs_mut(&mut self) -> OutputIterator<'_>

Get all output streams.

Provided Methods§

Source

fn broadcast_open(&mut self)

Broadcast an open bracket to all output streams.

Source

fn broadcast_close(&mut self)

Broadcast a close bracket to all output streams.

Source

fn broadcast_done(&mut self)

Broadcast a done signal to all output streams.

Source

fn broadcast_err(&mut self, err: impl Into<String>)

Broadcast an error to all output streams.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Port> Broadcast for T