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.

Gets the raw sender for the peer.

Gets the raw reciever for the peer.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.