Trait BinaryReadAlign

Source
pub trait BinaryReadAlign: BinaryRead + Seek {
    // Required method
    fn align(&mut self, alignment: usize) -> Result<usize>;

    // Provided methods
    fn align4(&mut self) -> Result<usize> { ... }
    fn align8(&mut self) -> Result<usize> { ... }
    fn align16(&mut self) -> Result<usize> { ... }
}

Required Methods§

Source

fn align(&mut self, alignment: usize) -> Result<usize>

Align the reader to the given alignment and return the aligned position.

Provided Methods§

Source

fn align4(&mut self) -> Result<usize>

Align the reader to 4 bytes.

Source

fn align8(&mut self) -> Result<usize>

Align the reader to 8 bytes.

Source

fn align16(&mut self) -> Result<usize>

Align the reader to 16 bytes.

Implementors§