pub struct Timestamp {
pub tm: Tm,
}
Fields
tm: Tm
Implementations
Methods from Deref<Target = Tm>
sourcepub fn to_timespec(&self) -> Timespec
pub fn to_timespec(&self) -> Timespec
Convert time to the seconds from January 1, 1970
sourcepub fn ctime(&self) -> TmFmt<'_>
pub fn ctime(&self) -> TmFmt<'_>
Returns a TmFmt that outputs according to the asctime
format in ISO
C, in the local timezone.
Example: “Thu Jan 1 00:00:00 1970”
sourcepub fn asctime(&self) -> TmFmt<'_>
pub fn asctime(&self) -> TmFmt<'_>
Returns a TmFmt that outputs according to the asctime
format in ISO
C.
Example: “Thu Jan 1 00:00:00 1970”
sourcepub fn strftime(&'a self, format: &'a str) -> Result<TmFmt<'a>, ParseError>
pub fn strftime(&'a self, format: &'a str) -> Result<TmFmt<'a>, ParseError>
Formats the time according to the format string.
sourcepub fn rfc822(&self) -> TmFmt<'_>
pub fn rfc822(&self) -> TmFmt<'_>
Returns a TmFmt that outputs according to RFC 822.
local: “Thu, 22 Mar 2012 07:53:18 PST” utc: “Thu, 22 Mar 2012 14:53:18 GMT”
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
sourcefn 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
impl StructuralPartialEq for Timestamp
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more