Skip to main content

BinaryWrite

Trait BinaryWrite 

Source
pub trait BinaryWrite {
    // Required methods
    fn write_to<W: Write>(&self, writer: &mut W) -> Result<()>;
    fn serialized_size(&self) -> usize;
}
Expand description

Trait for types that can be written to binary format

Required Methods§

Source

fn write_to<W: Write>(&self, writer: &mut W) -> Result<()>

Write this type to a binary writer

Source

fn serialized_size(&self) -> usize

Get the size in bytes when serialized

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§