#[non_exhaustive]pub struct Node<'a> {
pub path: &'a str,
pub name: Name,
pub range: ByteRange,
pub header_len: u32,
pub depth: u32,
pub version: Option<u8>,
pub flags: Option<u32>,
pub user_type: Option<[u8; 16]>,
}Expand description
One element met while walking a container’s tree.
Flat containers report one node per segment at depth 1. Containers that nest elements (ISO BMFF boxes) also report the nested ones, which are not segments: segments tile the file once, nodes describe its hierarchy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: &'a strSlash-separated names from the root, for example /moov/trak/mdia. Valid
only during the callback.
name: NameThe element’s own name.
range: ByteRangeWhole element, header through end.
header_len: u32Bytes of framing before the content: size, type, extended size and extended type. A FullBox’s version and flags are reported separately.
depth: u321 for top-level elements.
version: Option<u8>FullBox version, if the element has one.
flags: Option<u32>FullBox flags, if the element has them.
user_type: Option<[u8; 16]>Extended type of a uuid box.
Implementations§
Source§impl<'a> Node<'a>
impl<'a> Node<'a>
Sourcepub const fn new(
path: &'a str,
name: Name,
range: ByteRange,
header_len: u32,
depth: u32,
) -> Self
pub const fn new( path: &'a str, name: Name, range: ByteRange, header_len: u32, depth: u32, ) -> Self
A node with no FullBox fields or user type; add them with the with_* methods.
Sourcepub const fn with_full_box(self, version: u8, flags: u32) -> Self
pub const fn with_full_box(self, version: u8, flags: u32) -> Self
Sets the FullBox version and flags.
Sourcepub const fn with_user_type(self, user_type: [u8; 16]) -> Self
pub const fn with_user_type(self, user_type: [u8; 16]) -> Self
Sets the extended type of a uuid box.