#[repr(C)]pub struct UnsafeTime {
pub sec: i32,
pub nanosec: u32,
}Expand description
Represents a timestamp that may not be safe across all platforms.
The “Unsafe” prefix indicates this is subject to the year-2038 problem
on 32-bit systems since sec is an i32.
This is compatible with ROS2’s builtin_interfaces/Time.
Fields§
§sec: i32Seconds since UNIX epoch.
nanosec: u32Nanoseconds component (0-999999999).
Implementations§
Trait Implementations§
Source§impl Clone for UnsafeTime
impl Clone for UnsafeTime
Source§fn clone(&self) -> UnsafeTime
fn clone(&self) -> UnsafeTime
Returns a duplicate 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 moreSource§impl Debug for UnsafeTime
impl Debug for UnsafeTime
Source§impl Default for UnsafeTime
impl Default for UnsafeTime
Source§fn default() -> UnsafeTime
fn default() -> UnsafeTime
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnsafeTime
impl<'de> Deserialize<'de> for UnsafeTime
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<&SystemTime> for UnsafeTime
impl From<&SystemTime> for UnsafeTime
Source§fn from(t: &SystemTime) -> Self
fn from(t: &SystemTime) -> Self
Converts to this type from the input type.
Source§impl From<&UnsafeTime> for SystemTime
impl From<&UnsafeTime> for SystemTime
Source§fn from(t: &UnsafeTime) -> Self
fn from(t: &UnsafeTime) -> Self
Converts to this type from the input type.
Source§impl From<SystemTime> for UnsafeTime
impl From<SystemTime> for UnsafeTime
Source§fn from(t: SystemTime) -> Self
fn from(t: SystemTime) -> Self
Converts to this type from the input type.
Source§impl From<UnsafeTime> for SystemTime
impl From<UnsafeTime> for SystemTime
Source§fn from(t: UnsafeTime) -> Self
fn from(t: UnsafeTime) -> Self
Converts to this type from the input type.
Source§impl Ord for UnsafeTime
impl Ord for UnsafeTime
Source§fn cmp(&self, other: &UnsafeTime) -> Ordering
fn cmp(&self, other: &UnsafeTime) -> Ordering
1.21.0 · 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 UnsafeTime
impl PartialEq for UnsafeTime
Source§impl PartialOrd for UnsafeTime
impl PartialOrd for UnsafeTime
Source§impl Serialize for UnsafeTime
impl Serialize for UnsafeTime
impl Copy for UnsafeTime
impl Eq for UnsafeTime
impl StructuralPartialEq for UnsafeTime
Auto Trait Implementations§
impl Freeze for UnsafeTime
impl RefUnwindSafe for UnsafeTime
impl Send for UnsafeTime
impl Sync for UnsafeTime
impl Unpin for UnsafeTime
impl UnsafeUnpin for UnsafeTime
impl UnwindSafe for UnsafeTime
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