pub struct Timestamp(pub DateTime<FixedOffset>);
Expand description
Метка времени
Тип на основе chrono::DateTime<FixedOffset>
. По-умолчанию создается текущая метка времени.
Tuple Fields§
§0: DateTime<FixedOffset>
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn to_rfc3339(&self) -> String
pub fn to_rfc3339(&self) -> String
Returns an RFC 3339 and ISO 8601 date and time string such as 1996-12-19T16:39:57-08:00
.
Sourcepub fn timestamp_nanos_opt(&self) -> Option<i64>
pub fn timestamp_nanos_opt(&self) -> Option<i64>
Возвращает время Unix с наносекундной точностью
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
Source§fn 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
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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