Trait MessageBufFor
pub trait MessageBufFor<D>:
Debug
+ Send
+ Syncwhere
D: ResourceDialect,{
// Required methods
fn new() -> Self;
fn split_mut(
&mut self,
) -> (&mut Vec<u8>, &mut Vec<<<D as ResourceDialect>::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§
fn new() -> Self
fn new() -> Self
Create a new message buffer.
fn split_mut(
&mut self,
) -> (&mut Vec<u8>, &mut Vec<<<D as ResourceDialect>::Handle as HandleFor<D>>::HandleInfo>)
fn split_mut( &mut self, ) -> (&mut Vec<u8>, &mut Vec<<<D as ResourceDialect>::Handle as HandleFor<D>>::HandleInfo>)
Access the contents of this buffer as two vectors.
Provided Methods§
fn shrink_bytes_to_fit(&mut self)
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", so this trait is not object safe.