pub struct PortChannel {
pub name: String,
/* private fields */
}Expand description
A PortChannel wraps an unbounded channel with a port name.
Fields§
§name: StringPort name.
Implementations§
Source§impl 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§
Source§impl Clone for PortChannel
impl Clone for PortChannel
Source§fn clone(&self) -> PortChannel
fn clone(&self) -> PortChannel
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for PortChannel
impl RefUnwindSafe for PortChannel
impl Send for PortChannel
impl Sync for PortChannel
impl Unpin for PortChannel
impl UnwindSafe for PortChannel
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