Enum webm_iterable::matroska_spec::Master [−]
Expand description
An enum that defines different possible states of a TagDataType::Master
tag.
A “master” tag is a type of tag that contains other tags within it. Because these tags are dynamically sized, the TagIterator
emits these tags as Master::Start
and Master::End
variants by default so that the entire tag does not need to be buffered into memory all at once. The Master::Full
variant is a complete “master” tag that includes all child tags within it.
Variants
Designates the start of a tag.
Designates the end of a tag.
Designates a full tag. Vec<T>
contains all child tags contained in this master tag.
Implementations
pub fn get_children(self) -> Vec<T, Global>
pub fn get_children(self) -> Vec<T, Global>
Convenience method to pull children from a master tag.
Panics
Panics if self
is not a Full
variant.
Examples
use ebml_iterable_specification::Master; let children = vec![EmptySpec::with_data(0x1253, &[1]), EmptySpec::with_data(0x1234, &[2])]; // Clone children because creating a Master consumes it let tag = Master::Full(children.clone()); let retrieved_children = tag.get_children(); assert_eq!(retrieved_children, children);
Trait Implementations
impl<T> PartialOrd<Master<T>> for Master<T> where
T: PartialOrd<T> + Clone,
impl<T> PartialOrd<Master<T>> for Master<T> where
T: PartialOrd<T> + Clone,
pub fn partial_cmp(&self, other: &Master<T>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Master<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T> StructuralEq for Master<T> where
T: Clone,
impl<T> StructuralPartialEq for Master<T> where
T: Clone,
Auto Trait Implementations
impl<T> RefUnwindSafe for Master<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Master<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more