Struct tzfile::ArcTz[][src]

pub struct ArcTz(pub Arc<Tz>);

Atomic reference-counted time zone.

This type is equivalent to Arc<Tz>, but needed to workaround Rust’s coherence rule to implement TimeZone.

Implementations

impl ArcTz[src]

pub fn new(tz: Tz) -> Self[src]

Wraps an existing Tz object in this atomic reference-counted container.

pub fn named(name: &str) -> Result<Self>[src]

Reads and parses a system time zone.

Equivalent to calling Tz::named() and wraps the result in this atomic reference-counted container.

This function is currently only supported on Unix.

Methods from Deref<Target = Tz>

Trait Implementations

impl Clone for ArcTz[src]

impl Debug for ArcTz[src]

impl Deref for ArcTz[src]

type Target = Tz

The resulting type after dereferencing.

impl Eq for ArcTz[src]

impl From<Tz> for ArcTz[src]

impl Hash for ArcTz[src]

impl PartialEq<ArcTz> for ArcTz[src]

impl StructuralEq for ArcTz[src]

impl StructuralPartialEq for ArcTz[src]

impl TimeZone for ArcTz[src]

type Offset = Offset<Self>

An associated offset type. This type is used to store the actual offset in date and time types. The original TimeZone value can be recovered via TimeZone::from_offset. Read more

Auto Trait Implementations

impl RefUnwindSafe for ArcTz

impl Send for ArcTz

impl Sync for ArcTz

impl Unpin for ArcTz

impl UnwindSafe for ArcTz

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.