pub struct TrackBounds { /* private fields */ }Expand description
Validated audio-region bounds for a track: audio_offset + audio_length
is guaranteed to fit within backing_size, so the reader can splice the
audio region without re-checking. Built at the tracks row reader.
Implementations§
Source§impl TrackBounds
impl TrackBounds
Sourcepub fn new(
audio_offset: u64,
audio_length: u64,
backing_size: u64,
) -> Result<TrackBounds, DbError>
pub fn new( audio_offset: u64, audio_length: u64, backing_size: u64, ) -> Result<TrackBounds, DbError>
Err if audio_offset + audio_length overflows or exceeds backing_size.
pub fn audio_offset(&self) -> u64
pub fn audio_length(&self) -> u64
Trait Implementations§
Source§impl Clone for TrackBounds
impl Clone for TrackBounds
Source§fn clone(&self) -> TrackBounds
fn clone(&self) -> TrackBounds
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 moreimpl Copy for TrackBounds
Source§impl Debug for TrackBounds
impl Debug for TrackBounds
impl Eq for TrackBounds
Source§impl PartialEq for TrackBounds
impl PartialEq for TrackBounds
Source§fn eq(&self, other: &TrackBounds) -> bool
fn eq(&self, other: &TrackBounds) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrackBounds
Auto Trait Implementations§
impl Freeze for TrackBounds
impl RefUnwindSafe for TrackBounds
impl Send for TrackBounds
impl Sync for TrackBounds
impl Unpin for TrackBounds
impl UnsafeUnpin for TrackBounds
impl UnwindSafe for TrackBounds
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