Struct icu_datetime::input::ExtractedDateTimeInput
source · pub(crate) struct ExtractedDateTimeInput {
year: Option<FormattableYear>,
month: Option<FormattableMonth>,
day_of_month: Option<DayOfMonth>,
iso_weekday: Option<IsoWeekday>,
day_of_year_info: Option<DayOfYearInfo>,
any_calendar_kind: Option<AnyCalendarKind>,
hour: Option<IsoHour>,
minute: Option<IsoMinute>,
second: Option<IsoSecond>,
nanosecond: Option<NanoSecond>,
}
Expand description
A DateTimeInput
type with all of the fields pre-extracted
See DateTimeInput
for documentation on individual fields
Fields§
§year: Option<FormattableYear>
§month: Option<FormattableMonth>
§day_of_month: Option<DayOfMonth>
§iso_weekday: Option<IsoWeekday>
§day_of_year_info: Option<DayOfYearInfo>
§any_calendar_kind: Option<AnyCalendarKind>
§hour: Option<IsoHour>
§minute: Option<IsoMinute>
§second: Option<IsoSecond>
§nanosecond: Option<NanoSecond>
Implementations§
source§impl ExtractedDateTimeInput
impl ExtractedDateTimeInput
sourcepub(crate) fn extract_from<T: DateTimeInput>(input: &T) -> Self
pub(crate) fn extract_from<T: DateTimeInput>(input: &T) -> Self
Construct given an instance of a DateTimeInput
.
sourcepub(crate) fn extract_from_date<T: DateInput>(input: &T) -> Self
pub(crate) fn extract_from_date<T: DateInput>(input: &T) -> Self
Construct given an instance of a DateTimeInput
.
sourcepub(crate) fn extract_from_time<T: IsoTimeInput>(input: &T) -> Self
pub(crate) fn extract_from_time<T: IsoTimeInput>(input: &T) -> Self
Construct given an instance of a DateTimeInput
.
source§impl ExtractedDateTimeInput
impl ExtractedDateTimeInput
pub(crate) fn week_of_month( &self, calculator: &WeekCalculator, ) -> Result<WeekOfMonth, ExtractedDateTimeInputWeekCalculatorError>
pub(crate) fn week_of_year( &self, calculator: &WeekCalculator, ) -> Result<(FormattableYear, WeekOfYear), ExtractedDateTimeInputWeekCalculatorError>
Trait Implementations§
source§impl Clone for ExtractedDateTimeInput
impl Clone for ExtractedDateTimeInput
source§fn clone(&self) -> ExtractedDateTimeInput
fn clone(&self) -> ExtractedDateTimeInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl DateInput for ExtractedDateTimeInput
impl DateInput for ExtractedDateTimeInput
§type Calendar = AnyCalendar
type Calendar = AnyCalendar
This actually doesn’t matter, by the time we use this it’s purely internal raw code where calendars are irrelevant
source§fn year(&self) -> Option<FormattableYear>
fn year(&self) -> Option<FormattableYear>
Gets the era and year input.
source§fn month(&self) -> Option<FormattableMonth>
fn month(&self) -> Option<FormattableMonth>
Gets the month input.
source§fn day_of_month(&self) -> Option<DayOfMonth>
fn day_of_month(&self) -> Option<DayOfMonth>
Gets the day input.
source§fn iso_weekday(&self) -> Option<IsoWeekday>
fn iso_weekday(&self) -> Option<IsoWeekday>
Gets the weekday input.
source§fn day_of_year_info(&self) -> Option<DayOfYearInfo>
fn day_of_year_info(&self) -> Option<DayOfYearInfo>
Gets information on the position of the day within the year.
source§fn any_calendar_kind(&self) -> Option<AnyCalendarKind>
fn any_calendar_kind(&self) -> Option<AnyCalendarKind>
Gets the kind of calendar this date is for, if associated with
AnyCalendar
In most cases you’ll probably want to return AnyCalendarKind::Iso
.source§impl Debug for ExtractedDateTimeInput
impl Debug for ExtractedDateTimeInput
source§impl Default for ExtractedDateTimeInput
impl Default for ExtractedDateTimeInput
source§fn default() -> ExtractedDateTimeInput
fn default() -> ExtractedDateTimeInput
Returns the “default value” for a type. Read more
impl Copy for ExtractedDateTimeInput
Auto Trait Implementations§
impl Freeze for ExtractedDateTimeInput
impl RefUnwindSafe for ExtractedDateTimeInput
impl Send for ExtractedDateTimeInput
impl Sync for ExtractedDateTimeInput
impl Unpin for ExtractedDateTimeInput
impl UnwindSafe for ExtractedDateTimeInput
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<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