Struct elastic_types::date::DateValue
[−]
[src]
pub struct DateValue(_);
A date value produced and consumed by date formats.
DateValue
is a very thin wrapper over DateTime<Utc>
that doesn't carry any formatting semantics.
Like FormattableDateValue
, this type is used for binding generics in methods that accept date values but it ignores any format on the input type.
You probably won't need to use it directly except to clobber the format on a Date<M>
or DateTime<Utc>
value.
Methods
impl DateValue
[src]
pub fn now() -> Self
[src]
Equivalent to DateTime<Utc>::now()
pub fn build(
year: i32,
month: u32,
day: u32,
hour: u32,
minute: u32,
second: u32,
milli: u32
) -> Self
[src]
year: i32,
month: u32,
day: u32,
hour: u32,
minute: u32,
second: u32,
milli: u32
) -> Self
Construct a DateValue
from individual parts.
Trait Implementations
impl Debug for DateValue
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for DateValue
[src]
fn clone(&self) -> DateValue
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for DateValue
[src]
fn eq(&self, __arg_0: &DateValue) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DateValue) -> bool
[src]
This method tests for !=
.
impl<TFormat> From<FormattableDateValue<TFormat>> for DateValue
[src]
fn from(date: FormattableDateValue<TFormat>) -> Self
[src]
Performs the conversion.
impl From<ChronoDateTime> for DateValue
[src]
fn from(date: ChronoDateTime) -> Self
[src]
Performs the conversion.
impl PartialEq<ChronoDateTime> for DateValue
[src]
fn eq(&self, other: &ChronoDateTime) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ChronoDateTime) -> bool
[src]
This method tests for !=
.
impl PartialEq<DateValue> for ChronoDateTime
[src]
fn eq(&self, other: &DateValue) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DateValue) -> bool
[src]
This method tests for !=
.
impl Borrow<ChronoDateTime> for DateValue
[src]
fn borrow(&self) -> &ChronoDateTime
[src]
Immutably borrows from an owned value. Read more
impl Deref for DateValue
[src]
type Target = ChronoDateTime
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<TFormat> From<DateValue> for FormattableDateValue<TFormat>
[src]
impl<TMapping> From<Date<TMapping>> for DateValue where
TMapping: DateMapping,
[src]
TMapping: DateMapping,
impl<TMapping> From<DateValue> for Date<TMapping> where
TMapping: DateMapping,
[src]
TMapping: DateMapping,