icu::calendar::any_calendar

Trait IntoAnyCalendar

Source
pub trait IntoAnyCalendar: Sized + Calendar {
    // Required methods
    fn to_any(self) -> AnyCalendar;
    fn kind(&self) -> AnyCalendarKind;
    fn from_any(any: AnyCalendar) -> Result<Self, AnyCalendar>;
    fn from_any_ref(any: &AnyCalendar) -> Option<&Self>;
    fn date_to_any(&self, d: &Self::DateInner) -> AnyDateInner;
}
Expand description

Trait for calendars that may be converted to AnyCalendar

Required Methods§

Source

fn to_any(self) -> AnyCalendar

Convert this calendar into an AnyCalendar, moving it

You should not need to call this method directly

Source

fn kind(&self) -> AnyCalendarKind

The AnyCalendarKind enum variant associated with this calendar

Source

fn from_any(any: AnyCalendar) -> Result<Self, AnyCalendar>

Move an AnyCalendar into a Self, or returning it as an error if the types do not match.

You should not need to call this method directly

Source

fn from_any_ref(any: &AnyCalendar) -> Option<&Self>

Convert an AnyCalendar reference into a Self reference.

You should not need to call this method directly

Source

fn date_to_any(&self, d: &Self::DateInner) -> AnyDateInner

Convert a date for this calendar into an AnyDateInner

You should not need to call this method directly

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§