Struct ros2_client::steady_time::TimeDiff
source · pub struct TimeDiff { /* private fields */ }
Expand description
Time difference can be negative, unlike std::time::Duration
Implementations§
source§impl TimeDiff
impl TimeDiff
pub const fn from_nanos(nanos: i64) -> TimeDiff
pub const fn from_millis(millis: i64) -> TimeDiff
pub const fn from_secs(secs: i64) -> TimeDiff
pub const fn as_nanos(self) -> i64
pub const fn as_millis(self) -> i64
pub const fn as_seconds(self) -> i64
pub fn as_duration(self) -> Result<Duration, NegativetimeDiffError>
pub fn as_saturating_duration(self) -> Duration
Trait Implementations§
source§impl Ord for TimeDiff
impl Ord for TimeDiff
source§impl PartialEq for TimeDiff
impl PartialEq for TimeDiff
source§impl PartialOrd for TimeDiff
impl PartialOrd for TimeDiff
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for TimeDiff
impl Eq for TimeDiff
impl StructuralPartialEq for TimeDiff
Auto Trait Implementations§
impl Freeze for TimeDiff
impl RefUnwindSafe for TimeDiff
impl Send for TimeDiff
impl Sync for TimeDiff
impl Unpin for TimeDiff
impl UnwindSafe for TimeDiff
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