pub struct Timestamp {
pub usec: i64,
}Expand description
Timestamp without timezone (microseconds since 2000-01-01)
Fields§
§usec: i64Microseconds since PostgreSQL epoch (2000-01-01 00:00:00)
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn from_pg_usec(usec: i64) -> Self
pub fn from_pg_usec(usec: i64) -> Self
Create from microseconds since PostgreSQL epoch
Sourcepub fn from_unix_secs(secs: i64) -> Self
pub fn from_unix_secs(secs: i64) -> Self
Create from Unix timestamp (seconds since 1970-01-01)
Sourcepub fn to_unix_secs(&self) -> i64
pub fn to_unix_secs(&self) -> i64
Convert to Unix timestamp (seconds since 1970-01-01)
Sourcepub fn to_unix_usec(&self) -> i64
pub fn to_unix_usec(&self) -> i64
Convert to Unix timestamp with microseconds
Trait Implementations§
impl Copy for Timestamp
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.