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§
sourcefn display(&mut self, when: Datetime) -> Result<TimezoneDisplay>
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.
sourcefn utc_offset(&mut self, when: Datetime) -> Result<i32>
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
impl<_T: Host + ?Sized + Send> Host for &mut _T
source§fn display(&mut self, when: Datetime) -> Result<TimezoneDisplay>
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.