WritableShape

Trait WritableShape 

Source
pub trait WritableShape {
    // Required methods
    fn size_in_bytes(&self) -> usize;
    fn write_to<T: Write>(&self, dest: &mut T) -> Result<(), Error>;
}
Expand description

Trait implemented by all Shapes that can be written

Required Methods§

Source

fn size_in_bytes(&self) -> usize

Returns the size in bytes that the Shapes will take once written. Does not include the shapetype

Source

fn write_to<T: Write>(&self, dest: &mut T) -> Result<(), Error>

Writes the shape to the dest

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.

Implementors§