pub struct Time { /* private fields */ }Implementations§
Source§impl Time
impl Time
pub fn now() -> Result<Time, TimeError>
pub fn now_utc8() -> Result<Time, TimeError>
pub fn now_secs() -> Result<u64, TimeError>
pub fn now_mills() -> Result<u128, TimeError>
pub fn now_nanos() -> Result<u128, TimeError>
pub fn from_secs(secs: u64) -> Time
pub fn from_msecs(msecs: u128) -> Time
pub fn rfc1123(&self) -> String
pub fn rfc3339(&self) -> String
pub fn common(&self) -> String
pub fn from_rfc1123(s: impl AsRef<[u8]>) -> Result<Time, TimeError>
pub fn from_rfc3339(s: impl AsRef<[u8]>) -> Result<Time, TimeError>
pub fn from_common(s: impl AsRef<[u8]>) -> Result<Time, TimeError>
pub fn as_mills(&self) -> u128
pub fn as_secs(&self) -> u128
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnsafeUnpin for Time
impl UnwindSafe for Time
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