pub trait BoxType {
const NAME: [u8; 4];
// Required methods
fn demux(header: BoxHeader, data: Bytes) -> Result<Self>
where Self: Sized;
fn primitive_size(&self) -> u64;
fn primitive_mux<T: Write>(&self, writer: &mut T) -> Result<()>;
// Provided methods
fn mux<T: Write>(&self, writer: &mut T) -> Result<()> { ... }
fn size(&self) -> u64 { ... }
fn validate(&self) -> Result<()> { ... }
}
Required Associated Constants§
Required Methods§
Sourcefn demux(header: BoxHeader, data: Bytes) -> Result<Self>where
Self: Sized,
fn demux(header: BoxHeader, data: Bytes) -> Result<Self>where
Self: Sized,
Parse a box from a byte stream. The basic header is already parsed.
Sourcefn primitive_size(&self) -> u64
fn primitive_size(&self) -> u64
The size of the box without the basic header.
Provided Methods§
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.