pub struct StateTime(pub i64);Expand description
State time (τs) - elastic, convergence-oriented Represented as microseconds since session epoch
Tuple Fields§
§0: i64Implementations§
Source§impl StateTime
impl StateTime
pub const ZERO: StateTime
pub const MAX: StateTime
pub const MIN: StateTime
pub fn from_micros(micros: i64) -> Self
pub fn from_millis(millis: i64) -> Self
pub fn from_secs_f64(secs: f64) -> Self
pub fn as_micros(self) -> i64
pub fn as_millis(self) -> i64
pub fn as_secs_f64(self) -> f64
Sourcepub fn to_wire_offset(self, reference: StateTime) -> i32
pub fn to_wire_offset(self, reference: StateTime) -> i32
Convert to wire format (100μs units, 32-bit offset)
Sourcepub fn from_wire_offset(reference: StateTime, offset_100us: i32) -> Self
pub fn from_wire_offset(reference: StateTime, offset_100us: i32) -> Self
Convert from wire format (100μs units, 32-bit offset)
pub fn saturating_add(self, duration: Duration) -> Self
pub fn saturating_sub(self, duration: Duration) -> Self
Trait Implementations§
Source§impl Ord for StateTime
impl Ord for StateTime
Source§impl PartialOrd for StateTime
impl PartialOrd for StateTime
impl Copy for StateTime
impl Eq for StateTime
impl StructuralPartialEq for StateTime
Auto Trait Implementations§
impl Freeze for StateTime
impl RefUnwindSafe for StateTime
impl Send for StateTime
impl Sync for StateTime
impl Unpin for StateTime
impl UnwindSafe for StateTime
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