[][src]Struct sunrise_time::timezone::TimeZoneManager

pub struct TimeZoneManager {
    location: LocationName,
    my_rules: TimeZoneRule,
    temp_rules: TimeZoneRule,
}

Global instance handling I/O and storage of the device rules.

Fields

location: LocationName

The location name of this device.

my_rules: TimeZoneRule

Rules of this device.

temp_rules: TimeZoneRule

Temporary rules storage used during timezone conversion.

Implementations

impl TimeZoneManager[src]

pub fn get_device_location_name(&self) -> LocationName[src]

Get the time zone name used on this devie.

pub fn set_device_location_name(
    &mut self,
    location: LocationName
) -> Result<(), Error>
[src]

Set the time zone name used on this devie.

Note:

This also load the new timezone rule.

pub fn set_device_location_name_unchecked(&mut self, location: LocationName)[src]

Set the time zone name used on this devie.

pub fn get_total_location_name_count(&self) -> Result<u32, Error>[src]

Get the total count of location name available

pub fn load_timezone_rule(
    &mut self,
    location: LocationName,
    timezone_rule: Option<&mut TimeZoneRule>
) -> Result<(), Error>
[src]

Load a time zone rule.

pub fn get_my_rules(&self) -> &TimeZoneRule[src]

Get the device timezone rule.

Auto Trait Implementations

impl RefUnwindSafe for TimeZoneManager

impl Send for TimeZoneManager

impl Sync for TimeZoneManager

impl Unpin for TimeZoneManager

impl UnwindSafe for TimeZoneManager

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> Same<T> for T

type Output = T

Should always be Self

impl<T> SizedIPCBuffer for T[src]

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.