Skip to main content

ConvertCalendar

Trait ConvertCalendar 

Source
pub trait ConvertCalendar {
    type Converted<'a>;

    // 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.

You often want to set Converted to an ICU4X built-in type.

If the type is not calendar-specific, such as a time or time zone, set Converted to the same type and return it in the implementation.

Required Associated Types§

Source

type Converted<'a>

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§