[][src]Struct crossref::response::work::Date

pub struct Date {
    pub date_parts: DateParts,
    pub timestamp: usize,
    pub date_time: String,
}

represents full date information for an item

Fields

date_parts: DateParts

Contains an ordered array of year, month, day of month. Only year is required. Note that the field contains a nested array, e.g. [ [ 2006, 5, 19 ] ] to conform to citeproc JSON dates

timestamp: usize

Seconds since UNIX epoch

date_time: String

ISO 8601 date time

Methods

impl Date[src]

pub fn as_date_field(&self) -> Option<DateField>[src]

converts the nested array of numbers into the correct representation of chrono NaiveDate

Trait Implementations

impl Clone for Date[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<Date> for Date[src]

impl Eq for Date[src]

impl Debug for Date[src]

impl Serialize for Date[src]

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

Auto Trait Implementations

impl Sync for Date

impl Unpin for Date

impl Send for Date

impl UnwindSafe for Date

impl RefUnwindSafe for Date

Blanket Implementations

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> From<T> 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.

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]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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