pub struct ExactSourceFramePeriodV1(/* private fields */);Expand description
Positive exact source-time units in one physical source frame.
Implementations§
Source§impl ExactSourceFramePeriodV1
impl ExactSourceFramePeriodV1
Sourcepub fn new(units_per_frame: i64) -> Result<Self, ExactSourceTimingContractError>
pub fn new(units_per_frame: i64) -> Result<Self, ExactSourceTimingContractError>
Validate a positive exact frame period.
Sourcepub const fn units_per_frame(self) -> i64
pub const fn units_per_frame(self) -> i64
Exact source-time units in one physical source frame.
Sourcepub fn is_whole_frame(self, coordinate_units: i64) -> bool
pub fn is_whole_frame(self, coordinate_units: i64) -> bool
Whether an absolute signed source-time coordinate lies on the frame lattice.
Sourcepub fn frame_index(self, coordinate_units: i64) -> Option<i64>
pub fn frame_index(self, coordinate_units: i64) -> Option<i64>
Exact signed frame index when the coordinate lies on the frame lattice.
Trait Implementations§
Source§impl Clone for ExactSourceFramePeriodV1
impl Clone for ExactSourceFramePeriodV1
Source§fn clone(&self) -> ExactSourceFramePeriodV1
fn clone(&self) -> ExactSourceFramePeriodV1
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 ExactSourceFramePeriodV1
Source§impl Debug for ExactSourceFramePeriodV1
impl Debug for ExactSourceFramePeriodV1
impl Eq for ExactSourceFramePeriodV1
Source§impl Ord for ExactSourceFramePeriodV1
impl Ord for ExactSourceFramePeriodV1
Source§fn cmp(&self, other: &ExactSourceFramePeriodV1) -> Ordering
fn cmp(&self, other: &ExactSourceFramePeriodV1) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExactSourceFramePeriodV1
impl PartialEq for ExactSourceFramePeriodV1
Source§impl PartialOrd for ExactSourceFramePeriodV1
impl PartialOrd for ExactSourceFramePeriodV1
impl StructuralPartialEq for ExactSourceFramePeriodV1
Auto Trait Implementations§
impl Freeze for ExactSourceFramePeriodV1
impl RefUnwindSafe for ExactSourceFramePeriodV1
impl Send for ExactSourceFramePeriodV1
impl Sync for ExactSourceFramePeriodV1
impl Unpin for ExactSourceFramePeriodV1
impl UnsafeUnpin for ExactSourceFramePeriodV1
impl UnwindSafe for ExactSourceFramePeriodV1
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