pub struct Zone {
pub name: String,
/* private fields */
}Fields§
§name: StringImplementations§
Source§impl Zone
impl Zone
pub fn utc() -> Zone
pub fn load(dir: &Path, name: &str) -> Result<Zone, String>
pub fn parse(name: &str, b: &[u8]) -> Result<Zone, String>
Sourcepub fn from_posix(s: &str) -> Option<Zone>
pub fn from_posix(s: &str) -> Option<Zone>
Parses a POSIX TZ string directly (e.g. for tests or fixed rules).
Sourcepub fn offset_at(&self, t: i64) -> i32
pub fn offset_at(&self, t: i64) -> i32
UTC offset (seconds) at the UTC instant t (Unix seconds).
Sourcepub fn next_transition_after(&self, t: i64) -> Option<i64>
pub fn next_transition_after(&self, t: i64) -> Option<i64>
First offset change strictly after t, if any within ~2 years.
Trait Implementations§
impl StructuralPartialEq for Zone
Auto Trait Implementations§
impl Freeze for Zone
impl RefUnwindSafe for Zone
impl Send for Zone
impl Sync for Zone
impl Unpin for Zone
impl UnsafeUnpin for Zone
impl UnwindSafe for Zone
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more