pub struct Cluster {
pub crc32: Option<Crc32>,
pub void: Option<Void>,
pub timestamp: Timestamp,
pub position: Option<Position>,
pub prev_size: Option<PrevSize>,
pub blocks: Vec<ClusterBlock>,
}Expand description
The Top-Level Element containing the (monolithic) Block structure.
Fields§
§crc32: Option<Crc32>Optional CRC-32 element for integrity checking.
void: Option<Void>void element, useful for reserving space during writing.
timestamp: TimestampAbsolute timestamp of the cluster, expressed in Segment Ticks which is based on TimestampScale; see timestamp-ticks. This element SHOULD be the first child element of the Cluster it belongs to, or the second if that Cluster contains a CRC-32 element (crc-32).
position: Option<Position>The Segment Position of the Cluster in the Segment (0 in live streams). It might help to resynchronise offset on damaged streams.
prev_size: Option<PrevSize>Size of the previous Cluster, in octets. Can be useful for backward playing.
blocks: Vec<ClusterBlock>One or more blocks of data (see Block and SimpleBlock) and their associated data (see BlockGroup).
Implementations§
Trait Implementations§
Source§impl Element for Cluster
impl Element for Cluster
Source§fn decode_body(buf: &mut &[u8]) -> Result<Self>
fn decode_body(buf: &mut &[u8]) -> Result<Self>
Decode the body of the element from a buffer.
Source§fn 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.
Source§const 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.
impl Eq for Cluster
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnsafeUnpin for Cluster
impl UnwindSafe for Cluster
Blanket Implementations§
Source§impl<T> AsyncReadElement for Twhere
T: Element,
impl<T> AsyncReadElement for Twhere
T: Element,
Source§impl<T> AsyncReadFrom for Twhere
T: Element,
impl<T> AsyncReadFrom for Twhere
T: Element,
Source§impl<T> AsyncWriteElement for Twhere
T: Element,
impl<T> AsyncWriteElement for Twhere
T: Element,
Source§impl<T> AsyncWriteTo for Twhere
T: Encode,
impl<T> AsyncWriteTo for Twhere
T: Encode,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more