#[repr(C)]pub struct UnsafeDuration {
pub sec: i32,
pub nanosec: u32,
}Expand description
Represents a duration 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.
Fields§
§sec: i32Seconds component.
nanosec: u32Nanoseconds component.
Implementations§
Trait Implementations§
Source§impl Clone for UnsafeDuration
impl Clone for UnsafeDuration
Source§fn clone(&self) -> UnsafeDuration
fn clone(&self) -> UnsafeDuration
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 UnsafeDuration
impl Debug for UnsafeDuration
Source§impl Default for UnsafeDuration
impl Default for UnsafeDuration
Source§fn default() -> UnsafeDuration
fn default() -> UnsafeDuration
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnsafeDuration
impl<'de> Deserialize<'de> for UnsafeDuration
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<&Duration> for UnsafeDuration
impl From<&Duration> for UnsafeDuration
Source§impl From<&UnsafeDuration> for Duration
impl From<&UnsafeDuration> for Duration
Source§fn from(t: &UnsafeDuration) -> Self
fn from(t: &UnsafeDuration) -> Self
Converts to this type from the input type.
Source§impl From<Duration> for UnsafeDuration
impl From<Duration> for UnsafeDuration
Source§impl From<UnsafeDuration> for Duration
impl From<UnsafeDuration> for Duration
Source§fn from(t: UnsafeDuration) -> Self
fn from(t: UnsafeDuration) -> Self
Converts to this type from the input type.
Source§impl Ord for UnsafeDuration
impl Ord for UnsafeDuration
Source§fn cmp(&self, other: &UnsafeDuration) -> Ordering
fn cmp(&self, other: &UnsafeDuration) -> 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 UnsafeDuration
impl PartialEq for UnsafeDuration
Source§impl PartialOrd for UnsafeDuration
impl PartialOrd for UnsafeDuration
Source§impl Serialize for UnsafeDuration
impl Serialize for UnsafeDuration
impl Copy for UnsafeDuration
impl Eq for UnsafeDuration
impl StructuralPartialEq for UnsafeDuration
Auto Trait Implementations§
impl Freeze for UnsafeDuration
impl RefUnwindSafe for UnsafeDuration
impl Send for UnsafeDuration
impl Sync for UnsafeDuration
impl Unpin for UnsafeDuration
impl UnsafeUnpin for UnsafeDuration
impl UnwindSafe for UnsafeDuration
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