Struct icu_calendar::DateDuration
source · [−]pub struct DateDuration<C: Calendar + ?Sized> {
pub years: i32,
pub months: i32,
pub weeks: i32,
pub days: i32,
pub marker: PhantomData<C>,
}
Expand description
A duration between two dates
Fields
years: i32
The number of years
months: i32
The number of months
weeks: i32
The number of weeks
days: i32
The number of days
marker: PhantomData<C>
A marker for the calendar
Implementations
Construct a DateDuration
// two years, three months, and five days
let duration: DateDuration<Iso> = DateDuration::new(2, 3, 0, 5);
Explicitly cast duration to one for a different calendar
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<C: ?Sized> RefUnwindSafe for DateDuration<C> where
C: RefUnwindSafe,
impl<C: ?Sized> Send for DateDuration<C> where
C: Send,
impl<C: ?Sized> Sync for DateDuration<C> where
C: Sync,
impl<C: ?Sized> Unpin for DateDuration<C> where
C: Unpin,
impl<C: ?Sized> UnwindSafe for DateDuration<C> where
C: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn filterable(
self,
filter_name: &'static str
) -> RequestFilterDataProvider<T, fn(&DataRequest) -> bool>
pub fn filterable(
self,
filter_name: &'static str
) -> RequestFilterDataProvider<T, fn(&DataRequest) -> bool>
Creates a filterable data provider with the given name for debugging. Read more