pub struct TimelineIndex { /* private fields */ }Expand description
The lazily expanded timeline.
Implementations§
Source§impl TimelineIndex
impl TimelineIndex
Sourcepub fn build(
timeline: &SegmentTimeline,
start_number: u64,
period_end_ticks: Option<u64>,
) -> Result<Self, AddressError>
pub fn build( timeline: &SegmentTimeline, start_number: u64, period_end_ticks: Option<u64>, ) -> Result<Self, AddressError>
Build the run table.
period_end_ticks is on the media timeline (PTO + (PEwc - PSwc)),
used by a trailing negative @r; None makes such a run a single
segment.
§Errors
AddressError for a non-increasing @t/@n, an oversized or
overflowing timeline, or an unsupported feature.
Sourcepub fn segment(&self, index: u64) -> Option<TimelineSegment>
pub fn segment(&self, index: u64) -> Option<TimelineSegment>
Segment at zero-based index.
Sourcepub fn index_at_or_before(&self, time: u64) -> Option<u64>
pub fn index_at_or_before(&self, time: u64) -> Option<u64>
Index of the last segment whose start is at or before time (media
timeline ticks); None when time precedes the first segment.
Sourcepub fn count_up_to_number(&self, max_number: u64) -> u64
pub fn count_up_to_number(&self, max_number: u64) -> u64
How many segments have a number at or below max_number
(@endNumber: a segment numbered above it is invalid, 5.3.9.5.3).
Sourcepub fn iter(&self) -> impl Iterator<Item = TimelineSegment> + '_
pub fn iter(&self) -> impl Iterator<Item = TimelineSegment> + '_
The segments in order (lazy).
Trait Implementations§
Source§impl Clone for TimelineIndex
impl Clone for TimelineIndex
Source§impl Debug for TimelineIndex
impl Debug for TimelineIndex
Auto Trait Implementations§
impl Forget for TimelineIndex
impl Freeze for TimelineIndex
impl Move for TimelineIndex
impl RefUnwindSafe for TimelineIndex
impl Send for TimelineIndex
impl Sync for TimelineIndex
impl Unpin for TimelineIndex
impl UnsafeUnpin for TimelineIndex
impl UnwindSafe for TimelineIndex
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