Skip to main content

BitWrite

Trait BitWrite 

Source
pub trait BitWrite {
    // Required methods
    fn write_ue(&mut self, value: u32) -> Result<()>;
    fn write_se(&mut self, value: i32) -> Result<()>;
    fn write_bit(&mut self, bit: bool) -> Result<()>;
    fn write<const BITS: u32, I: Integer>(&mut self, value: I) -> Result<()>;
    fn write_var<I: Integer>(&mut self, bit_count: u32, value: I) -> Result<()>;
    fn write_rbsp_trailing_bits(&mut self) -> Result<()>;
}
Expand description

Writes H.26x bitstream syntax elements.

This is the write counterpart to BitRead.

Required Methods§

Source

fn write_ue(&mut self, value: u32) -> Result<()>

Writes an unsigned Exp-Golomb-coded value, as defined in the H.264 spec.

Source

fn write_se(&mut self, value: i32) -> Result<()>

Writes a signed Exp-Golomb-coded value, as defined in the H.264 spec.

Source

fn write_bit(&mut self, bit: bool) -> Result<()>

Writes a single bit.

Source

fn write<const BITS: u32, I: Integer>(&mut self, value: I) -> Result<()>

Writes BITS bits of value.

Source

fn write_var<I: Integer>(&mut self, bit_count: u32, value: I) -> Result<()>

Writes bit_count bits of value.

Source

fn write_rbsp_trailing_bits(&mut self) -> Result<()>

Writes the RBSP trailing bits: a stop bit (1) and then zero-padding to byte boundary.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§