pub struct BoundaryChecker { /* private fields */ }Expand description
Checks timecodes against a set of allowed SMPTE ranges.
Implementations§
Source§impl BoundaryChecker
impl BoundaryChecker
Sourcepub fn add_range(&mut self, range: SmpteRange)
pub fn add_range(&mut self, range: SmpteRange)
Add an allowed range.
Sourcepub fn from_ranges(ranges: &[SmpteRange]) -> Self
pub fn from_ranges(ranges: &[SmpteRange]) -> Self
Create a checker from a slice of ranges.
Sourcepub fn is_allowed(&self, tc: &Timecode) -> bool
pub fn is_allowed(&self, tc: &Timecode) -> bool
Check whether a timecode is inside any of the allowed ranges.
Sourcepub fn matching_ranges(&self, tc: &Timecode) -> usize
pub fn matching_ranges(&self, tc: &Timecode) -> usize
Return how many allowed ranges contain the given timecode.
Trait Implementations§
Source§impl Clone for BoundaryChecker
impl Clone for BoundaryChecker
Source§fn clone(&self) -> BoundaryChecker
fn clone(&self) -> BoundaryChecker
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 BoundaryChecker
impl Debug for BoundaryChecker
Auto Trait Implementations§
impl Freeze for BoundaryChecker
impl RefUnwindSafe for BoundaryChecker
impl Send for BoundaryChecker
impl Sync for BoundaryChecker
impl Unpin for BoundaryChecker
impl UnsafeUnpin for BoundaryChecker
impl UnwindSafe for BoundaryChecker
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