Trait symphonia_core::io::vlc::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 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 Associated Constants§

source

const JUMP_OFFSET_MAX: u32

The maximum jump offset.

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.

Object Safety§

This trait is not object safe.

Implementors§