wasmtime_wasi::bindings::sync::clocks::timezone

Trait Host

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

Required Methods§

Source

fn display(&mut self, when: Datetime) -> Result<TimezoneDisplay>

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) -> Result<i32>

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

Implementations on Foreign Types§

Source§

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

Source§

fn display(&mut self, when: Datetime) -> Result<TimezoneDisplay>

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) -> Result<i32>

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

Implementors§