pub struct DisplayZone { /* private fields */ }Expand description
Where people see and type instants; stored and JSON instants stay UTC.
Implementations§
Source§impl DisplayZone
impl DisplayZone
pub fn named(name: &str) -> Result<Self>
Sourcepub fn current() -> &'static Self
pub fn current() -> &'static Self
UTC unless installed first; reading it fixes it, so no instant is read in two zones.
pub fn install(self) -> Result<()>
pub fn name(&self) -> &str
pub fn wall_clock(&self, instant: Instant) -> DateTime
Sourcepub fn repeats(&self, wall_clock: DateTime) -> bool
pub fn repeats(&self, wall_clock: DateTime) -> bool
True where a backward shift repeats it, so only an offset tells its two instants apart.
pub fn repeated_offset(&self, instant: Instant) -> Option<String>
Sourcepub fn with_offset(&self, instant: Instant) -> String
pub fn with_offset(&self, instant: Instant) -> String
On the zone’s wall clock with its offset there, such as 2026-10-25T02:30:00+01:00.
pub fn instant_at(&self, wall_clock: DateTime) -> Result<Instant>
Trait Implementations§
Source§impl Clone for DisplayZone
impl Clone for DisplayZone
Auto Trait Implementations§
impl Freeze for DisplayZone
impl RefUnwindSafe for DisplayZone
impl Send for DisplayZone
impl Sync for DisplayZone
impl Unpin for DisplayZone
impl UnsafeUnpin for DisplayZone
impl UnwindSafe for DisplayZone
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more