Struct backroll_transport::BidirectionalAsyncChannel [−][src]
pub struct BidirectionalAsyncChannel<T> { /* fields omitted */ }
Implementations
Creates a pair of connected Peers without limitations on how many messages can be buffered.
Creates a pair of connected Peers with a limited capacity for many messages can be buffered in either direction.
Sends a message to the connected peer.
If the send buffer is full, this method waits until there is space for a message.
If the peer is disconnected, this method returns an error.
Receives a message from the connected peer.
If there is no pending messages, this method waits until there is a message.
If the peer is disconnected, this method receives a message or returns an error if there are no more messages.
Attempts to send a message to the connected peer.
Attempts to receive a message from the connected peer.
Returns true if the associated peer is still connected.
Disconnects the paired Peers from either end. Any future attempts to send messages in either direction will fail, but any messages not yet recieved.
If the Peer, or it’s constituent channels were cloned, all of the cloned instances will appear disconnected.
The number of messages that are currently buffered in the send queue. Returns 0 if the Peer is disconnected.
The number of messages that are currently buffered in the recieve queue. Returns 0 if the Peer is disconnected.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for BidirectionalAsyncChannel<T>
impl<T> Send for BidirectionalAsyncChannel<T> where
T: Send,
impl<T> Sync for BidirectionalAsyncChannel<T> where
T: Send,
impl<T> Unpin for BidirectionalAsyncChannel<T>
impl<T> UnwindSafe for BidirectionalAsyncChannel<T>
Blanket Implementations
Mutably borrows from an owned value. Read more