wasmtime_wasi::bindings::clocks::timezone

Trait Host

source
pub trait Host: 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§