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

Object Safety§

This trait is not object safe.

Implementors§