Skip to main content

Cal

Struct Cal 

Source
pub struct Cal<Ca, Tz>
where Ca: AsCalendar, Tz: TimeZone,
{ /* private fields */ }
Available on crate feature icu only.
Expand description

A calendar based on icu4x

Implementations§

Source§

impl<Ca, Tz> Cal<Ca, Tz>
where Ca: AsCalendar, Tz: TimeZone,

Source

pub fn new(cal: Ca, tz: Tz) -> Cal<Ca, Tz>

Create a calendar with the given settings

This allows creating a kine calendar that deals with time in the tz timezone, and whose days are in the cal calendar.

Trait Implementations§

Source§

impl<Ca, Tz> Calendar for Cal<Ca, Tz>
where Ca: Clone + AsCalendar, Tz: Clone + TimeZone, <Tz as TimeZone>::Sigil: Clone,

Source§

type Time = Time<Ca, Tz>

The data needed to represent a time in this calendar
Source§

fn write(&self, t: &Time) -> Result<<Cal<Ca, Tz> as Calendar>::Time, Error>

Find the possible ways of writing time t in this calendar system
Source§

fn try_now(&self) -> Result<Self::Time, Error>

Retrieve the current time in this calendar
Source§

fn now(&self) -> Self::Time

Retrieve the current time in this calendar Read more

Auto Trait Implementations§

§

impl<Ca, Tz> Freeze for Cal<Ca, Tz>
where Ca: Freeze, Tz: Freeze,

§

impl<Ca, Tz> RefUnwindSafe for Cal<Ca, Tz>

§

impl<Ca, Tz> Send for Cal<Ca, Tz>
where Ca: Send, Tz: Send,

§

impl<Ca, Tz> Sync for Cal<Ca, Tz>
where Ca: Sync, Tz: Sync,

§

impl<Ca, Tz> Unpin for Cal<Ca, Tz>
where Ca: Unpin, Tz: Unpin,

§

impl<Ca, Tz> UnsafeUnpin for Cal<Ca, Tz>
where Ca: UnsafeUnpin, Tz: UnsafeUnpin,

§

impl<Ca, Tz> UnwindSafe for Cal<Ca, Tz>
where Ca: UnwindSafe, Tz: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.