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§
Sourcefn byte_order(&self) -> ByteOrder
fn byte_order(&self) -> ByteOrder
Returns the byte order mode for the stream
Sourcefn set_byte_order(&mut self, order: ByteOrder)
fn set_byte_order(&mut self, order: ByteOrder)
Sets the byte order mode on the stream
Provided Methods§
Sourcefn write_bytes(&mut self, bytes: &[u8]) -> Result<()>
fn write_bytes(&mut self, bytes: &[u8]) -> Result<()>
Writes all of bytes
to the underlying stream or returns an error
Sourcefn write_byte(&mut self, byte: u8) -> Result<()>
fn write_byte(&mut self, byte: u8) -> Result<()>
Writes byte to the underlying stream or returns an error