pub struct RegionLayout { /* private fields */ }Expand description
An ordered description of a synthesized virtual file: the metadata region
(inline framing + art images) followed by the backing audio. Totals are
computed once at construction; segments is private so they cannot desync.
Implementations§
Source§impl RegionLayout
impl RegionLayout
pub fn validated(segments: Vec<Segment>) -> Result<RegionLayout, LayoutError>
Sourcepub fn segments(&self) -> &[Segment]
pub fn segments(&self) -> &[Segment]
The ordered segments composing the synthesized virtual file.
Sourcepub fn has_binary_tag(&self) -> bool
pub fn has_binary_tag(&self) -> bool
True if any segment streams an opaque binary tag payload from the DB.
Sourcepub fn total_len(&self) -> u64
pub fn total_len(&self) -> u64
Total size of the synthesized virtual file in bytes (stored at construction).
Sourcepub fn header_len(&self) -> u64
pub fn header_len(&self) -> u64
Size of the synthesized metadata region preceding the backing audio (stored).
Sourcepub fn validate(&self) -> Result<(), LayoutError>
pub fn validate(&self) -> Result<(), LayoutError>
Validate basic producer invariants. Returns Ok(()) if the layout is
structurally sound (no empty metadata segments, lengths don’t overflow).
Zero-length backing audio is valid for formats that can represent an
empty media payload.
Trait Implementations§
Source§impl Clone for RegionLayout
impl Clone for RegionLayout
Source§fn clone(&self) -> RegionLayout
fn clone(&self) -> RegionLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegionLayout
impl Debug for RegionLayout
impl Eq for RegionLayout
Source§impl PartialEq for RegionLayout
impl PartialEq for RegionLayout
Source§fn eq(&self, other: &RegionLayout) -> bool
fn eq(&self, other: &RegionLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RegionLayout
Auto Trait Implementations§
impl Freeze for RegionLayout
impl RefUnwindSafe for RegionLayout
impl Send for RegionLayout
impl Sync for RegionLayout
impl Unpin for RegionLayout
impl UnsafeUnpin for RegionLayout
impl UnwindSafe for RegionLayout
Blanket Implementations§
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