Struct jormungandr_lib::time::LocalDateTime
source · pub struct LocalDateTime(OffsetDateTime);
Expand description
local date and time. While the SystemTime
will give us a number of seconds
since UNIX Epoch this will take into account the locality of the caller, taking
into account daylight saving.
Example
let time = LocalDateTime::now();
println!("now: {}", time);
// now: Mon, 17 Jun 2019 20:19:29 +0200
Tuple Fields§
§0: OffsetDateTime
Implementations§
source§impl LocalDateTime
impl LocalDateTime
Trait Implementations§
source§impl AsRef<OffsetDateTime> for LocalDateTime
impl AsRef<OffsetDateTime> for LocalDateTime
source§impl Clone for LocalDateTime
impl Clone for LocalDateTime
source§fn clone(&self) -> LocalDateTime
fn clone(&self) -> LocalDateTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LocalDateTime
impl Debug for LocalDateTime
source§impl<'de> Deserialize<'de> for LocalDateTime
impl<'de> Deserialize<'de> for LocalDateTime
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 Display for LocalDateTime
impl Display for LocalDateTime
source§impl FromStr for LocalDateTime
impl FromStr for LocalDateTime
source§impl Hash for LocalDateTime
impl Hash for LocalDateTime
source§impl Ord for LocalDateTime
impl Ord for LocalDateTime
source§fn cmp(&self, other: &LocalDateTime) -> Ordering
fn cmp(&self, other: &LocalDateTime) -> Ordering
1.21.0 · 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 PartialEq<LocalDateTime> for LocalDateTime
impl PartialEq<LocalDateTime> for LocalDateTime
source§fn eq(&self, other: &LocalDateTime) -> bool
fn eq(&self, other: &LocalDateTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LocalDateTime> for LocalDateTime
impl PartialOrd<LocalDateTime> for LocalDateTime
source§fn partial_cmp(&self, other: &LocalDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &LocalDateTime) -> Option<Ordering>
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 Serialize for LocalDateTime
impl Serialize for LocalDateTime
source§impl TryFrom<SystemTime> for LocalDateTime
impl TryFrom<SystemTime> for LocalDateTime
§type Error = SystemTimeError
type Error = SystemTimeError
The type returned in the event of a conversion error.
impl Copy for LocalDateTime
impl Eq for LocalDateTime
impl StructuralEq for LocalDateTime
impl StructuralPartialEq for LocalDateTime
Auto Trait Implementations§
impl RefUnwindSafe for LocalDateTime
impl Send for LocalDateTime
impl Sync for LocalDateTime
impl Unpin for LocalDateTime
impl UnwindSafe for LocalDateTime
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