pub trait Element: Sized {
const ID: VInt64;
const HAS_DEFAULT_VALUE: bool = false;
// Required methods
fn decode_body(buf: &mut &[u8]) -> Result<Self>;
fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>;
}Expand description
A Matroska element.
Required Associated Constants§
Provided Associated Constants§
Sourceconst HAS_DEFAULT_VALUE: bool = false
const HAS_DEFAULT_VALUE: bool = false
Whether the element has a default value, as per Matroska specification. If true, and the element is missing in a master element, it should be treated as if it were present with the default value. If false, and the element is missing in a master element, it should be treated as an error.
Required Methods§
Sourcefn decode_body(buf: &mut &[u8]) -> Result<Self>
fn decode_body(buf: &mut &[u8]) -> Result<Self>
Decode the body of the element from a buffer.
Sourcefn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
Encode the body of the element to a buffer.
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.