pub struct UnixTime(/* private fields */);
Implementations§
Source§impl UnixTime
impl UnixTime
pub const fn new(sec: u64) -> UnixTime
pub fn from_ymd(y: i32, m: i32, d: i32) -> UnixTime
pub const fn from_hours(hr: u32) -> UnixTime
pub fn and_hms(&self, hh: u32, mm: u32, ss: u32) -> UnixTime
pub fn and_nanos(&self, nano: u32) -> TimeVal
pub fn and_micros(&self, micros: u32) -> TimeVal
pub fn and_millis(&self, millis: u32) -> TimeVal
pub fn date(&self) -> (i32, i32, i32)
pub fn is_midnight(&self) -> bool
pub fn hms(&self) -> (u32, u32, u32)
pub fn to_string(&self) -> String
pub fn now() -> UnixTime
Trait Implementations§
Source§impl AddAssign for UnixTime
impl AddAssign for UnixTime
Source§fn add_assign(&mut self, rhs: UnixTime)
fn add_assign(&mut self, rhs: UnixTime)
Performs the
+=
operation. Read moreSource§impl Ord for UnixTime
impl Ord for UnixTime
Source§impl PartialOrd for UnixTime
impl PartialOrd for UnixTime
Source§impl SubAssign for UnixTime
impl SubAssign for UnixTime
Source§fn sub_assign(&mut self, rhs: UnixTime)
fn sub_assign(&mut self, rhs: UnixTime)
Performs the
-=
operation. Read moreimpl Copy for UnixTime
impl Eq for UnixTime
Auto Trait Implementations§
impl Freeze for UnixTime
impl RefUnwindSafe for UnixTime
impl Send for UnixTime
impl Sync for UnixTime
impl Unpin for UnixTime
impl UnwindSafe for UnixTime
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