Skip to main content

WriteAligned

Trait WriteAligned 

Source
pub trait WriteAligned {
    // Required methods
    fn write_only<T>(&mut self, value: &T)
       where T: ?Sized + Write;
    fn store<T>(&mut self, frame: T) -> Result<()>
       where T: Storable;
    fn store_frame<T>(&mut self, frame: T)
       where T: Frame;
    fn extend_from_slice(&mut self, bytes: &[u8]);
    fn extend_from_slice_nul(&mut self, bytes: &[u8]);
}
Expand description

Trait for types which can be written to.

Required Methods§

Source

fn write_only<T>(&mut self, value: &T)
where T: ?Sized + Write,

Only write to the buffer without appending a signature.

Source

fn store<T>(&mut self, frame: T) -> Result<()>
where T: Storable,

Only store the specified value without appending its signature.

Source

fn store_frame<T>(&mut self, frame: T)
where T: Frame,

Only store the specified value without appending its signature.

Source

fn extend_from_slice(&mut self, bytes: &[u8])

Extend the buffer with a slice.

Source

fn extend_from_slice_nul(&mut self, bytes: &[u8])

Extend the buffer with a slice ending with a NUL byte.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§