Struct quantmath::dates::datetime::DateTime [−][src]
pub struct DateTime { /* fields omitted */ }
Convenience struct that groups a date and a time of day. For example, this represents the time of a fixing.
Methods
impl DateTime
[src]
impl DateTime
pub fn new(date: Date, time_of_day: TimeOfDay) -> DateTime
[src]
pub fn new(date: Date, time_of_day: TimeOfDay) -> DateTime
pub fn date(&self) -> Date
[src]
pub fn date(&self) -> Date
pub fn time_of_day(&self) -> TimeOfDay
[src]
pub fn time_of_day(&self) -> TimeOfDay
Trait Implementations
impl Debug for DateTime
[src]
impl Debug for DateTime
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for DateTime
[src]
impl Clone for DateTime
fn clone(&self) -> DateTime
[src]
fn clone(&self) -> DateTime
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for DateTime
[src]
impl Copy for DateTime
impl PartialEq for DateTime
[src]
impl PartialEq for DateTime
fn eq(&self, other: &DateTime) -> bool
[src]
fn eq(&self, other: &DateTime) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DateTime) -> bool
[src]
fn ne(&self, other: &DateTime) -> bool
This method tests for !=
.
impl Eq for DateTime
[src]
impl Eq for DateTime
impl PartialOrd for DateTime
[src]
impl PartialOrd for DateTime
fn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &DateTime) -> bool
[src]
fn lt(&self, other: &DateTime) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &DateTime) -> bool
[src]
fn le(&self, other: &DateTime) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &DateTime) -> bool
[src]
fn gt(&self, other: &DateTime) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &DateTime) -> bool
[src]
fn ge(&self, other: &DateTime) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for DateTime
[src]
impl Ord for DateTime
fn cmp(&self, other: &DateTime) -> Ordering
[src]
fn cmp(&self, other: &DateTime) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for DateTime
[src]
impl Hash for DateTime
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Add<i32> for DateTime
[src]
impl Add<i32> for DateTime
type Output = DateTime
The resulting type after applying the +
operator.
fn add(self, other: i32) -> DateTime
[src]
fn add(self, other: i32) -> DateTime
Performs the +
operation.
impl AddAssign<i32> for DateTime
[src]
impl AddAssign<i32> for DateTime
fn add_assign(&mut self, other: i32)
[src]
fn add_assign(&mut self, other: i32)
Performs the +=
operation.
impl Display for DateTime
[src]
impl Display for DateTime