WriteByteable

Trait WriteByteable 

Source
pub trait WriteByteable: Write {
    // Provided method
    fn write_one<T: Byteable>(&mut self, data: T) -> Result<()> { ... }
}
Expand description

Extends std::io::Write with a method to write a Byteable type.

Provided Methods§

Source

fn write_one<T: Byteable>(&mut self, data: T) -> Result<()>

Writes one Byteable element to the writer.

This method will convert the Byteable data into its byte array representation and then write all those bytes to the underlying writer.

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§

Source§

impl<T: Write> WriteByteable for T

Implements WriteByteable for all types that implement std::io::Write.