Host

Trait Host 

Source
pub trait Host: Send {
    // Required methods
    fn display(
        &mut self,
        when: Datetime,
    ) -> impl Future<Output = Result<TimezoneDisplay>> + Send;
    fn utc_offset(
        &mut self,
        when: Datetime,
    ) -> impl Future<Output = Result<i32>> + Send;
}

Required Methods§

Source

fn display( &mut self, when: Datetime, ) -> impl Future<Output = Result<TimezoneDisplay>> + Send

Return information needed to display the given datetime. This includes the UTC offset, the time zone name, and a flag indicating whether daylight saving time is active.

If the timezone cannot be determined for the given datetime, return a timezone-display for UTC with a utc-offset of 0 and no daylight saving time.

Source

fn utc_offset( &mut self, when: Datetime, ) -> impl Future<Output = Result<i32>> + Send

The same as display, but only return the UTC offset.

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.

Implementations on Foreign Types§

Source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

Source§

fn display( &mut self, when: Datetime, ) -> impl Future<Output = Result<TimezoneDisplay>> + Send

Return information needed to display the given datetime. This includes the UTC offset, the time zone name, and a flag indicating whether daylight saving time is active.

If the timezone cannot be determined for the given datetime, return a timezone-display for UTC with a utc-offset of 0 and no daylight saving time.

Source§

fn utc_offset( &mut self, when: Datetime, ) -> impl Future<Output = Result<i32>> + Send

The same as display, but only return the UTC offset.

Implementors§