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§
Sourcefn size_in_bytes(&self) -> usize
fn size_in_bytes(&self) -> usize
Returns the size in bytes that the Shapes will take once written. Does not include the shapetype
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.