pub trait Host {
// 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<_T: Host + ?Sized> Host for &mut _T
impl<_T: Host + ?Sized> 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.
Source§fn 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.