pub struct DurationRange {
pub start_frames: i64,
pub end_frames: i64,
}Expand description
A half-open frame range [start_frames, end_frames)
Fields§
§start_frames: i64First frame of the range (inclusive)
end_frames: i64Last frame of the range (exclusive)
Implementations§
Source§impl DurationRange
impl DurationRange
Sourcepub fn duration_frames(&self) -> i64
pub fn duration_frames(&self) -> i64
Return the total number of frames covered by the range
Sourcepub fn contains(&self, frame: i64) -> bool
pub fn contains(&self, frame: i64) -> bool
Returns true when frame falls within [start_frames, end_frames)
Sourcepub fn overlaps(&self, other: &DurationRange) -> bool
pub fn overlaps(&self, other: &DurationRange) -> bool
Returns true when this range overlaps with other
Trait Implementations§
Source§impl Clone for DurationRange
impl Clone for DurationRange
Source§fn clone(&self) -> DurationRange
fn clone(&self) -> DurationRange
Returns a duplicate of the value. Read more
1.0.0 · 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 DurationRange
impl Debug for DurationRange
Source§impl PartialEq for DurationRange
impl PartialEq for DurationRange
impl Copy for DurationRange
impl Eq for DurationRange
impl StructuralPartialEq for DurationRange
Auto Trait Implementations§
impl Freeze for DurationRange
impl RefUnwindSafe for DurationRange
impl Send for DurationRange
impl Sync for DurationRange
impl Unpin for DurationRange
impl UnsafeUnpin for DurationRange
impl UnwindSafe for DurationRange
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