Struct edgedb_protocol::model::Datetime
source · pub struct Datetime { /* private fields */ }
Expand description
A UTC date and time.
Implementations§
source§impl Datetime
impl Datetime
pub const MIN: Datetime = _
pub const MAX: Datetime = _
pub const UNIX_EPOCH: Datetime = _
sourcepub fn try_from_unix_micros(micros: i64) -> Result<Datetime, OutOfRangeError>
pub fn try_from_unix_micros(micros: i64) -> Result<Datetime, OutOfRangeError>
Convert microseconds since unix epoch into a datetime
pub fn try_from_micros(micros: i64) -> Result<Datetime, OutOfRangeError>
👎Deprecated since 0.5.0: use try_from_unix_micros instead
pub fn from_micros(micros: i64) -> Datetime
👎Deprecated since 0.5.0: use from_unix_micros instead
sourcepub fn from_unix_micros(micros: i64) -> Datetime
pub fn from_unix_micros(micros: i64) -> Datetime
pub fn to_micros(self) -> i64
👎Deprecated since 0.5.0: use to_unix_micros instead
sourcepub fn to_unix_micros(self) -> i64
pub fn to_unix_micros(self) -> i64
Convert datetime to microseconds since Unix Epoch
Trait Implementations§
source§impl From<Datetime> for LocalDatetime
impl From<Datetime> for LocalDatetime
source§fn from(d: Datetime) -> LocalDatetime
fn from(d: Datetime) -> LocalDatetime
Converts to this type from the input type.
source§impl Ord for Datetime
impl Ord for Datetime
source§impl PartialEq<Datetime> for Datetime
impl PartialEq<Datetime> for Datetime
source§impl PartialOrd<Datetime> for Datetime
impl PartialOrd<Datetime> for Datetime
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<Datetime> for SystemTime
impl TryFrom<Datetime> for SystemTime
source§impl TryFrom<SystemTime> for Datetime
impl TryFrom<SystemTime> for Datetime
§type Error = OutOfRangeError
type Error = OutOfRangeError
The type returned in the event of a conversion error.
impl Copy for Datetime
impl Eq for Datetime
impl StructuralEq for Datetime
impl StructuralPartialEq for Datetime
Auto Trait Implementations§
impl RefUnwindSafe for Datetime
impl Send for Datetime
impl Sync for Datetime
impl Unpin for Datetime
impl UnwindSafe for Datetime
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