pub enum DateTimeCrate {
Inferred,
Chrono,
Time,
}Available on crate feature
_unstable-docs only.Expand description
The preferred crate to use for mapping date/time types to Rust.
Variantsยง
Inferred
Use whichever crate is enabled (time then chrono).
Chrono
Always use types from chrono.
[macros.preferred-crates]
date-time = "chrono"Time
Always use types from time.
[macros.preferred-crates]
date-time = "time"Implementationsยง
Sourceยงimpl DateTimeCrate
impl DateTimeCrate
Sourcepub fn is_inferred(&self) -> bool
pub fn is_inferred(&self) -> bool
Returns self == Self::Inferred
pub fn crate_name(&self) -> Option<&str>
Trait Implementationsยง
Sourceยงimpl Debug for DateTimeCrate
impl Debug for DateTimeCrate
Sourceยงimpl Default for DateTimeCrate
impl Default for DateTimeCrate
Sourceยงfn default() -> DateTimeCrate
fn default() -> DateTimeCrate
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl PartialEq for DateTimeCrate
impl PartialEq for DateTimeCrate
impl Eq for DateTimeCrate
impl StructuralPartialEq for DateTimeCrate
Auto Trait Implementationsยง
impl Freeze for DateTimeCrate
impl RefUnwindSafe for DateTimeCrate
impl Send for DateTimeCrate
impl Sync for DateTimeCrate
impl Unpin for DateTimeCrate
impl UnwindSafe for DateTimeCrate
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<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.Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more