Struct edgedb_protocol::model::DateDuration
source · [−]pub struct DateDuration { /* private fields */ }
Expand description
A type that can represent a human-friendly date duration like 1 month or two days.
Implementations
sourceimpl DateDuration
impl DateDuration
pub fn try_from_years(years: i32) -> Result<DateDuration, OutOfRangeError>
pub fn from_years(years: i32) -> DateDuration
pub fn try_from_months(months: i32) -> Result<DateDuration, OutOfRangeError>
pub fn from_months(months: i32) -> DateDuration
pub fn try_from_days(days: i32) -> Result<DateDuration, OutOfRangeError>
pub fn from_days(days: i32) -> DateDuration
pub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
Trait Implementations
sourceimpl Add<DateDuration> for DateDuration
impl Add<DateDuration> for DateDuration
type Output = DateDuration
type Output = DateDuration
The resulting type after applying the +
operator.
sourceimpl Clone for DateDuration
impl Clone for DateDuration
sourcefn clone(&self) -> DateDuration
fn clone(&self) -> DateDuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DateDuration
impl Debug for DateDuration
sourceimpl Display for DateDuration
impl Display for DateDuration
sourceimpl Hash for DateDuration
impl Hash for DateDuration
sourceimpl Ord for DateDuration
impl Ord for DateDuration
sourceimpl PartialEq<DateDuration> for DateDuration
impl PartialEq<DateDuration> for DateDuration
sourcefn eq(&self, other: &DateDuration) -> bool
fn eq(&self, other: &DateDuration) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DateDuration) -> bool
fn ne(&self, other: &DateDuration) -> bool
This method tests for !=
.
sourceimpl PartialOrd<DateDuration> for DateDuration
impl PartialOrd<DateDuration> for DateDuration
sourcefn partial_cmp(&self, other: &DateDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &DateDuration) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Sub<DateDuration> for DateDuration
impl Sub<DateDuration> for DateDuration
type Output = DateDuration
type Output = DateDuration
The resulting type after applying the -
operator.
impl Copy for DateDuration
impl Eq for DateDuration
impl StructuralEq for DateDuration
impl StructuralPartialEq for DateDuration
Auto Trait Implementations
impl RefUnwindSafe for DateDuration
impl Send for DateDuration
impl Sync for DateDuration
impl Unpin for DateDuration
impl UnwindSafe for DateDuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more