pub trait Host {
// Required methods
fn display(
&mut self,
this: Timezone,
when: Datetime
) -> Result<TimezoneDisplay>;
fn utc_offset(&mut self, this: Timezone, when: Datetime) -> Result<i32>;
fn drop_timezone(&mut self, this: Timezone) -> Result<()>;
}
Required Methods§
sourcefn display(&mut self, this: Timezone, when: Datetime) -> Result<TimezoneDisplay>
fn display(&mut self, this: Timezone, 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.
sourcefn utc_offset(&mut self, this: Timezone, when: Datetime) -> Result<i32>
fn utc_offset(&mut self, this: Timezone, when: Datetime) -> Result<i32>
The same as display
, but only return the UTC offset.
sourcefn drop_timezone(&mut self, this: Timezone) -> Result<()>
fn drop_timezone(&mut self, this: Timezone) -> Result<()>
Dispose of the specified input-stream, after which it may no longer be used.