Struct SystemTime

pub struct SystemTime { pub(crate) t: Timespec }

Fields

t: Timespec

Implementations

impl SystemTime

const MAX: SystemTime = _;
const MIN: SystemTime = _;
fn new(tv_sec: i64, tv_nsec: i64) -> Result<SystemTime, Error>
fn now() -> SystemTime
fn sub_time(&self, other: &SystemTime) -> Result<Duration, Duration>
fn checked_add_duration(&self, other: &Duration) -> Option<SystemTime>
fn checked_sub_duration(&self, other: &Duration) -> Option<SystemTime>

Trait Implementations

impl Clone for SystemTime

fn clone(&self) -> SystemTime

impl Copy for SystemTime

impl Debug for SystemTime

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for SystemTime

fn assert_fields_are_eq(&self)

impl Hash for SystemTime

fn hash<__H: Hasher>(&self, state: &mut __H)

impl Ord for SystemTime

fn cmp(&self, other: &SystemTime) -> Ordering

impl PartialEq for SystemTime

fn eq(&self, other: &SystemTime) -> bool

impl PartialOrd for SystemTime

fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>

impl StructuralPartialEq for SystemTime

impl TrivialClone for SystemTime

Auto Trait Implementations

impl Freeze for SystemTime

impl RefUnwindSafe for SystemTime

impl Send for SystemTime

impl Sync for SystemTime

impl Unpin for SystemTime

impl UnsafeUnpin for SystemTime

impl UnwindSafe for SystemTime

Blanket Implementations

impl<T> Any for SystemTime where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for SystemTime where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for SystemTime where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for SystemTime where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for SystemTime

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for SystemTime where T: Copy + Debug,

impl<T> SizeHint for SystemTime where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for SystemTime

impl<T> ToOwned for SystemTime where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for SystemTime where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for SystemTime where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for SystemTime where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>