#[repr(transparent)]pub struct CuTime(pub u64);Expand description
A robot time is a monotonic timestamp in nanoseconds from the robot clock epoch.
Tuple Fields§
§0: u64Implementations§
Source§impl CuTime
impl CuTime
pub const MIN: CuTime
pub const MAX: CuTime
pub fn max(self, other: CuTime) -> CuTime
pub fn min(self, other: CuTime) -> CuTime
pub fn as_nanos(&self) -> u64
pub fn as_micros(&self) -> u64
pub fn as_millis(&self) -> u64
pub fn as_secs(&self) -> u64
pub fn from_nanos(nanos: u64) -> Self
pub fn from_micros(micros: u64) -> Self
pub fn from_millis(millis: u64) -> Self
pub fn from_secs(secs: u64) -> Self
Trait Implementations§
Source§impl Add<CuDuration> for CuTime
impl Add<CuDuration> for CuTime
Source§impl AddAssign<CuDuration> for CuTime
impl AddAssign<CuDuration> for CuTime
Source§fn add_assign(&mut self, rhs: CuDuration)
fn add_assign(&mut self, rhs: CuDuration)
Performs the
+= operation. Read moreSource§impl AddAssign for CuTime
impl AddAssign for CuTime
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<'de, Context> BorrowDecode<'de, Context> for CuTime
impl<'de, Context> BorrowDecode<'de, Context> for CuTime
Source§fn borrow_decode<D: BorrowDecoder<'de>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<'de> Deserialize<'de> for CuTime
impl<'de> Deserialize<'de> for CuTime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CuDuration> for CuTime
impl From<CuDuration> for CuTime
Source§fn from(duration: CuDuration) -> Self
fn from(duration: CuDuration) -> Self
Converts to this type from the input type.
Source§impl From<CuTime> for CuDuration
impl From<CuTime> for CuDuration
Source§impl From<CuTime> for OptionCuTime
impl From<CuTime> for OptionCuTime
Source§impl Ord for CuTime
impl Ord for CuTime
Source§impl PartialOrd for CuTime
impl PartialOrd for CuTime
Source§impl SaturatingSub for CuTime
impl SaturatingSub for CuTime
fn saturating_sub(self, other: Self) -> Self
Source§impl Sub<CuDuration> for CuTime
impl Sub<CuDuration> for CuTime
Source§impl SubAssign<CuDuration> for CuTime
impl SubAssign<CuDuration> for CuTime
Source§fn sub_assign(&mut self, rhs: CuDuration)
fn sub_assign(&mut self, rhs: CuDuration)
Performs the
-= operation. Read moreSource§impl SubAssign for CuTime
impl SubAssign for CuTime
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for CuTime
impl Eq for CuTime
impl StructuralPartialEq for CuTime
Auto Trait Implementations§
impl Freeze for CuTime
impl RefUnwindSafe for CuTime
impl Send for CuTime
impl Sync for CuTime
impl Unpin for CuTime
impl UnsafeUnpin for CuTime
impl UnwindSafe for CuTime
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