pub struct Time(pub Timestamp);Expand description
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
Tuple Fields§
§0: TimestampTrait Implementations§
Source§impl<'de> Deserialize<'de> for Time
impl<'de> Deserialize<'de> for Time
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Time, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Time, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Time
Source§impl Ord for Time
impl Ord for Time
1.21.0 (const: unstable) · 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 PartialOrd for Time
impl PartialOrd for Time
Source§impl Serialize for Time
impl Serialize for Time
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Time
Source§impl TimeExt for Time
impl TimeExt for Time
fn now() -> Self
fn to_system_time(&self) -> SystemTime
fn try_from_system_time(time: SystemTime) -> Result<Self, Error>
fn from_zoned(time: Zoned) -> Self
fn to_utc_date_time(&self) -> UtcDateTime
fn try_from_utc_date_time(time: UtcDateTime) -> Result<Self, Error>
fn try_to_zoned(&self) -> Result<Zoned, Error>
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