[][src]Struct emseries::DateTimeTz

pub struct DateTimeTz(pub DateTime<Tz>);

This is a wrapper around date time objects, using timezones from the chroon-tz database and providing string representation and parsing of the form " ", i.e., "2019-05-15T14:30:00Z US/Central". The to_string method, and serde serialization will produce a string of this format. The parser will accept an RFC3339-only string of the forms "2019-05-15T14:30:00Z", "2019-05-15T14:30:00+00:00", and also an "RFC3339 Timezone Name" string.

The function here is to generate as close to unambiguous time/date strings, (for earth's gravitational frame of reference), as possible. Clumping together the time, offset from UTC, and the named time zone allows future parsers to know the exact interpretation of the time in the frame of reference of the original recording.

Methods

impl DateTimeTz[src]

pub fn map<F>(&self, f: F) -> DateTimeTz where
    F: FnOnce(DateTime<Tz>) -> DateTime<Tz>, 
[src]

pub fn to_string(&self) -> String[src]

pub fn from_str(s: &str) -> Result<DateTimeTz, ParseError>[src]

Trait Implementations

impl Clone for DateTimeTz[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for DateTimeTz[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<DateTimeTz> for DateTimeTz[src]

impl PartialEq<DateTimeTz> for DateTimeTz[src]

impl Eq for DateTimeTz[src]

impl Debug for DateTimeTz[src]

impl Serialize for DateTimeTz[src]

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

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]