Struct icu_capi::week::ffi::WeekCalculator
source · pub struct WeekCalculator(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 WeekCalculator
impl WeekCalculator
sourcepub fn create(locale: &Locale) -> Result<Box<WeekCalculator>, DataError>
pub fn create(locale: &Locale) -> Result<Box<WeekCalculator>, DataError>
Creates a new WeekCalculator
from locale data using compiled data.
sourcepub fn create_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<WeekCalculator>, DataError>
pub fn create_with_provider( provider: &DataProvider, locale: &Locale, ) -> Result<Box<WeekCalculator>, DataError>
Creates a new WeekCalculator
from locale data using a particular data source.
pub fn from_first_day_of_week_and_min_week_days( first_weekday: IsoWeekday, min_week_days: u8, ) -> Box<WeekCalculator>
sourcepub fn first_weekday(&self) -> IsoWeekday
pub fn first_weekday(&self) -> IsoWeekday
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) -> WeekendContainsDay
Auto Trait Implementations§
impl Freeze for WeekCalculator
impl RefUnwindSafe for WeekCalculator
impl Send for WeekCalculator
impl Sync for WeekCalculator
impl Unpin for WeekCalculator
impl UnwindSafe for WeekCalculator
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