Struct wasmflow_traits::PortChannel
source · [−]pub struct PortChannel {
pub name: String,
/* private fields */
}
Expand description
A PortChannel wraps an unbounded channel with a port name.
Fields
name: String
Port name.
Implementations
sourceimpl PortChannel
impl PortChannel
sourcepub fn new<T: AsRef<str>>(name: T) -> Self
pub fn new<T: AsRef<str>>(name: T) -> Self
Constructor for a PortChannel.
sourcepub fn open(&mut self) -> UnboundedReceiverStream<PacketWrapper>
pub fn open(&mut self) -> UnboundedReceiverStream<PacketWrapper>
Initialize the PortChannel and return a receiver.
sourcepub fn send(
&self,
msg: PacketWrapper
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn send(
&self,
msg: PacketWrapper
) -> Result<(), Box<dyn Error + Send + Sync>>
Send a messages to the channel.
sourcepub fn merge_all(buffer: &mut [&mut PortChannel]) -> PacketStream
pub fn merge_all(buffer: &mut [&mut PortChannel]) -> PacketStream
Merge a list of PortChannels into a TransportStream.
Trait Implementations
sourceimpl Clone for PortChannel
impl Clone for PortChannel
sourcefn clone(&self) -> PortChannel
fn clone(&self) -> PortChannel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PortChannel
impl Send for PortChannel
impl Sync for PortChannel
impl Unpin for PortChannel
impl !UnwindSafe for PortChannel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more