Struct icu_capi::week::ffi::ICU4XWeekCalculator
source · pub struct ICU4XWeekCalculator(pub WeekCalculator);
Expand description
A Week calculator, useful to be passed in to week_of_year()
on Date and DateTime types
Tuple Fields§
§0: WeekCalculator
Implementations§
source§impl ICU4XWeekCalculator
impl ICU4XWeekCalculator
sourcepub fn create(
provider: &ICU4XDataProvider,
locale: &ICU4XLocale,
) -> Result<Box<ICU4XWeekCalculator>, ICU4XError>
pub fn create( provider: &ICU4XDataProvider, locale: &ICU4XLocale, ) -> Result<Box<ICU4XWeekCalculator>, ICU4XError>
Creates a new ICU4XWeekCalculator
from locale data.
pub fn create_from_first_day_of_week_and_min_week_days( first_weekday: ICU4XIsoWeekday, min_week_days: u8, ) -> Box<ICU4XWeekCalculator>
sourcepub fn first_weekday(&self) -> ICU4XIsoWeekday
pub fn first_weekday(&self) -> ICU4XIsoWeekday
Returns the weekday that starts the week for this object’s locale
sourcepub fn min_week_days(&self) -> u8
pub fn min_week_days(&self) -> u8
The minimum number of days overlapping a year required for a week to be considered part of that year
pub fn weekend(&self) -> ICU4XWeekendContainsDay
Auto Trait Implementations§
impl Freeze for ICU4XWeekCalculator
impl RefUnwindSafe for ICU4XWeekCalculator
impl Send for ICU4XWeekCalculator
impl Sync for ICU4XWeekCalculator
impl Unpin for ICU4XWeekCalculator
impl UnwindSafe for ICU4XWeekCalculator
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> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
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
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