pub struct ReliableBincodeChannel { /* private fields */ }
Expand description

Wraps a ReliableChannel together with an internal buffer to allow easily sending message types serialized with bincode.

Messages are guaranteed to arrive, and are guaranteed to be in order. Messages have a maximum length, but this maximum size can be larger than the size of an individual packet.

Implementations

Create a new ReliableBincodeChannel with a maximum message size of max_message_len.

Write the given message to the reliable channel.

In order to ensure that messages are sent in a timely manner, flush must be called after calling this method. Without calling flush, any pending writes will not be sent until the next automatic sender task wakeup.

This method is cancel safe, it will never partially send a message, though canceling it may or may not buffer a message to be sent.

Ensure that any previously sent messages are sent as soon as possible.

This method is cancel safe.

Read the next available incoming message.

This method is cancel safe, it will never partially read a message or drop received messages.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.