Struct CuDuration
pub struct CuDuration(pub u64);
Expand description
For Robot times, the underlying type is a u64 representing nanoseconds. It is always positive to simplify the reasoning on the user side.
Tuple Fields§
§0: u64
Implementations§
§impl CuDuration
impl CuDuration
pub const MIN: CuDuration
pub const MAX: CuDuration
pub fn max(&self, p0: CuDuration) -> CuDuration
pub fn min(&self, p0: CuDuration) -> CuDuration
pub fn as_nanos(&self) -> u64
Trait Implementations§
§impl Add for CuDuration
impl Add for CuDuration
§type Output = CuDuration
type Output = CuDuration
The resulting type after applying the
+
operator.§fn add(self, rhs: CuDuration) -> <CuDuration as Add>::Output
fn add(self, rhs: CuDuration) -> <CuDuration as Add>::Output
Performs the
+
operation. Read more§impl AddAssign for CuDuration
impl AddAssign for CuDuration
§fn add_assign(&mut self, rhs: CuDuration)
fn add_assign(&mut self, rhs: CuDuration)
Performs the
+=
operation. Read more§impl<'de> BorrowDecode<'de> for CuDuration
impl<'de> BorrowDecode<'de> for CuDuration
§fn borrow_decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>where
D: BorrowDecoder<'de>,
fn borrow_decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>where
D: BorrowDecoder<'de>,
Attempt to decode this type with the given BorrowDecode.
§impl Clone for CuDuration
impl Clone for CuDuration
§fn clone(&self) -> CuDuration
fn clone(&self) -> CuDuration
Returns a copy 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 more§impl Debug for CuDuration
impl Debug for CuDuration
§impl Decode for CuDuration
impl Decode for CuDuration
§fn decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>where
D: Decoder,
fn decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>where
D: Decoder,
Attempt to decode this type with the given Decode.
§impl Default for CuDuration
impl Default for CuDuration
§fn default() -> CuDuration
fn default() -> CuDuration
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for CuDuration
impl<'de> Deserialize<'de> for CuDuration
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CuDuration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CuDuration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for CuDuration
impl Display for CuDuration
§impl<T> Div<T> for CuDuration
impl<T> Div<T> for CuDuration
§type Output = CuDuration
type Output = CuDuration
The resulting type after applying the
/
operator.§fn div(self, rhs: T) -> CuDuration
fn div(self, rhs: T) -> CuDuration
Performs the
/
operation. Read more§impl Encode for CuDuration
impl Encode for CuDuration
§impl From<CuDuration> for OptionCuTime
impl From<CuDuration> for OptionCuTime
§fn from(val: CuDuration) -> OptionCuTime
fn from(val: CuDuration) -> OptionCuTime
Converts to this type from the input type.
§impl From<CuDuration> for Tov
impl From<CuDuration> for Tov
§fn from(duration: CuDuration) -> Tov
fn from(duration: CuDuration) -> Tov
Converts to this type from the input type.
§impl From<Duration> for CuDuration
bridge the API with standard Durations.
impl From<Duration> for CuDuration
bridge the API with standard Durations.
§fn from(duration: Duration) -> CuDuration
fn from(duration: Duration) -> CuDuration
Converts to this type from the input type.
§impl From<u64> for CuDuration
impl From<u64> for CuDuration
§fn from(duration: u64) -> CuDuration
fn from(duration: u64) -> CuDuration
Converts to this type from the input type.
§impl<T> Mul<T> for CuDuration
impl<T> Mul<T> for CuDuration
§type Output = CuDuration
type Output = CuDuration
The resulting type after applying the
*
operator.§fn mul(self, rhs: T) -> CuDuration
fn mul(self, rhs: T) -> CuDuration
Performs the
*
operation. Read more§impl Ord for CuDuration
impl Ord for CuDuration
§impl PartialEq for CuDuration
impl PartialEq for CuDuration
§impl PartialOrd for CuDuration
impl PartialOrd for CuDuration
§impl Serialize for CuDuration
impl Serialize for CuDuration
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl Sub for CuDuration
impl Sub for CuDuration
§type Output = CuDuration
type Output = CuDuration
The resulting type after applying the
-
operator.§fn sub(self, rhs: CuDuration) -> <CuDuration as Sub>::Output
fn sub(self, rhs: CuDuration) -> <CuDuration as Sub>::Output
Performs the
-
operation. Read more§impl SubAssign for CuDuration
impl SubAssign for CuDuration
§fn sub_assign(&mut self, rhs: CuDuration)
fn sub_assign(&mut self, rhs: CuDuration)
Performs the
-=
operation. Read moreimpl Copy for CuDuration
impl Eq for CuDuration
impl StructuralPartialEq for CuDuration
Auto Trait Implementations§
impl Freeze for CuDuration
impl RefUnwindSafe for CuDuration
impl Send for CuDuration
impl Sync for CuDuration
impl Unpin for CuDuration
impl UnwindSafe for CuDuration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()
] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString
]. Read more