[][src]Struct google_maps::time_zone::response::Response

pub struct Response {
    pub dst_offset: Option<i16>,
    pub error_message: Option<String>,
    pub raw_offset: Option<i16>,
    pub status: Status,
    pub time_zone_id: Option<String>,
    pub time_zone_name: Option<String>,
}

The response from the Google Maps Time Zone API will be stored in this structure.

Time Zone Responses

For each valid request, the time zone service will return a response in the format indicated within the request URI.

Calculating the Local Time

The local time of a given location is the sum of the timestamp parameter, and the dstOffset and rawOffset fields from the result.

Fields

dst_offset: Option<i16>

The offset for daylight-savings time in seconds. This will be zero if the time zone is not in Daylight Savings Time during the specified time.

error_message: Option<String>

More detailed information about the reasons behind the given status code, if other than OK.

Note: This field is not guaranteed to be always present, and its content is subject to change.

raw_offset: Option<i16>

The offset from UTC (in seconds) for the given location. This does not take into effect daylight savings.

status: Status

The status of the response.

time_zone_id: Option<String>

A string containing the ID of the time zone, such as "America/Los_Angeles" or "Australia/Sydney". These IDs are defined by Unicode Common Locale Data Repository (CLDR) project, and currently available in file timezone.xml. When a timezone has several IDs, the canonical one is returned. In timezone.xml, this is the first alias of each timezone. For example, "Asia/Calcutta" is returned, not "Asia/Kolkata".

time_zone_name: Option<String>

A string containing the long form name of the time zone. This field will be localized if the language parameter is set. eg. "Pacific Daylight Time" or "Australian Eastern Daylight Time"

Trait Implementations

impl Clone for Response[src]

impl Debug for Response[src]

impl<'de> Deserialize<'de> for Response[src]

impl Eq for Response[src]

impl Hash for Response[src]

impl Ord for Response[src]

impl PartialEq<Response> for Response[src]

impl PartialOrd<Response> for Response[src]

impl Serialize for Response[src]

impl StructuralEq for Response[src]

impl StructuralPartialEq for Response[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,