Skip to main content

MessageBufFor

Trait MessageBufFor 

Source
pub trait MessageBufFor<D: ResourceDialect>:
    Debug
    + Send
    + Sync {
    // Required methods
    fn new() -> Self;
    fn split_mut(
        &mut self,
    ) -> (&mut Vec<u8>, &mut Vec<<D::Handle as HandleFor<D>>::HandleInfo>);

    // Provided method
    fn shrink_bytes_to_fit(&mut self) { ... }
}
Expand description

Message buffer used to hold a message in a particular dialect.

Required Methods§

Source

fn new() -> Self

Create a new message buffer.

Source

fn split_mut( &mut self, ) -> (&mut Vec<u8>, &mut Vec<<D::Handle as HandleFor<D>>::HandleInfo>)

Access the contents of this buffer as two vectors.

Provided Methods§

Source

fn shrink_bytes_to_fit(&mut self)

Discard any allocated-but-unused space in the byte portion of this buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§