Trait icu_datetime::scaffold::ConvertCalendar

source ·
pub trait ConvertCalendar {
    type Converted<'a>: Sized;

    // Required method
    fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>;
}
Expand description

A type that can be converted into a specific calendar system.

Required Associated Types§

source

type Converted<'a>: Sized

The converted type. This can be the same as the receiver type.

Required Methods§

source

fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>

Converts self to the specified [AnyCalendar].

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConvertCalendar for Time

source§

type Converted<'a> = Time

source§

fn to_calendar<'a>(&self, _: &'a AnyCalendar) -> Self::Converted<'a>

source§

impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>> ConvertCalendar for Date<A>

source§

type Converted<'a> = Date<Ref<'a, AnyCalendar>>

source§

fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>

source§

impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>> ConvertCalendar for DateTime<A>

source§

type Converted<'a> = DateTime<Ref<'a, AnyCalendar>>

source§

fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>

source§

impl<C: IntoAnyCalendar, A: AsCalendar<Calendar = C>, Z: Copy> ConvertCalendar for CustomZonedDateTime<A, Z>

source§

type Converted<'a> = CustomZonedDateTime<Ref<'a, AnyCalendar>, Z>

source§

fn to_calendar<'a>(&self, calendar: &'a AnyCalendar) -> Self::Converted<'a>

source§

impl<O: TimeZoneModel> ConvertCalendar for TimeZoneInfo<O>

source§

type Converted<'a> = TimeZoneInfo<O>

source§

fn to_calendar<'a>(&self, _: &'a AnyCalendar) -> Self::Converted<'a>

Implementors§