symphonia_core::io::vlc

Trait CodebookEntry

Source
pub trait CodebookEntry:
    Copy
    + Clone
    + Default {
    type ValueType: Copy + From<u8>;
    type OffsetType: Copy;

    const JUMP_OFFSET_MAX: u32;

    // Required methods
    fn new_value(value: Self::ValueType, len: u8) -> Self;
    fn new_jump(offset: u32, len: u8) -> Self;
    fn is_value(&self) -> bool;
    fn is_jump(&self) -> bool;
    fn value(&self) -> Self::ValueType;
    fn value_len(&self) -> u32;
    fn jump_offset(&self) -> usize;
    fn jump_len(&self) -> u32;
}
Expand description

CodebookEntry provides the functions required for an entry in the Codebook.

Required Associated Constants§

Source

const JUMP_OFFSET_MAX: u32

The maximum jump offset.

Required Associated Types§

Source

type ValueType: Copy + From<u8>

The type of a value in this entry.

Source

type OffsetType: Copy

The type of a jump offset in this entry.

Required Methods§

Source

fn new_value(value: Self::ValueType, len: u8) -> Self

Creates a new value entry.

Source

fn new_jump(offset: u32, len: u8) -> Self

Create a new jump entry.

Source

fn is_value(&self) -> bool

Returns true if this entry is a value entry.

Source

fn is_jump(&self) -> bool

Returns true if this entry is a jump entry.

Source

fn value(&self) -> Self::ValueType

Gets the value.

Source

fn value_len(&self) -> u32

Get the length of the value in bits.

Source

fn jump_offset(&self) -> usize

Get the position in the table to jump to.

Source

fn jump_len(&self) -> u32

Get the number of bits to read after jumping in the table.

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§