pub enum StreamDirection {
Source,
Sink,
Duplex,
}Expand description
Flow direction of a stream relative to its owner.
Variants§
Source
Produces envelopes (output).
Sink
Consumes envelopes (input).
Duplex
Both produces and consumes envelopes.
Implementations§
Source§impl StreamDirection
impl StreamDirection
Sourcepub fn symbol(self) -> Symbol
pub fn symbol(self) -> Symbol
Returns the stream/direction/* symbol identifying this direction.
Sourcepub fn from_symbol(symbol: &Symbol) -> Result<Self>
pub fn from_symbol(symbol: &Symbol) -> Result<Self>
Parses a StreamDirection from its stream/direction/* symbol.
Returns an error for any symbol outside the known directions.
Trait Implementations§
Source§impl Clone for StreamDirection
impl Clone for StreamDirection
Source§fn clone(&self) -> StreamDirection
fn clone(&self) -> StreamDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StreamDirection
Source§impl Debug for StreamDirection
impl Debug for StreamDirection
impl Eq for StreamDirection
Source§impl PartialEq for StreamDirection
impl PartialEq for StreamDirection
Source§fn eq(&self, other: &StreamDirection) -> bool
fn eq(&self, other: &StreamDirection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamDirection
Auto Trait Implementations§
impl Freeze for StreamDirection
impl RefUnwindSafe for StreamDirection
impl Send for StreamDirection
impl Sync for StreamDirection
impl Unpin for StreamDirection
impl UnsafeUnpin for StreamDirection
impl UnwindSafe for StreamDirection
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