Trait DataOutput

Source
pub trait DataOutput: Write {
    // Required methods
    fn byte_order(&self) -> ByteOrder;
    fn set_byte_order(&mut self, order: ByteOrder);

    // Provided methods
    fn write_bytes(&mut self, bytes: &[u8]) -> Result<()> { ... }
    fn write_byte(&mut self, byte: u8) -> Result<()> { ... }
}
Expand description

A Trait for types that can perform binary IO Writes

Required Methods§

Source

fn byte_order(&self) -> ByteOrder

Returns the byte order mode for the stream

Source

fn set_byte_order(&mut self, order: ByteOrder)

Sets the byte order mode on the stream

Provided Methods§

Source

fn write_bytes(&mut self, bytes: &[u8]) -> Result<()>

Writes all of bytes to the underlying stream or returns an error

Source

fn write_byte(&mut self, byte: u8) -> Result<()>

Writes byte to the underlying stream or returns an error

Implementors§