[][src]Struct holding_kronos::DateTime

pub struct DateTime { /* fields omitted */ }

DateTime is a position in time relative to an era in a given calendar.

Implementations

impl DateTime[src]

pub fn new(seconds: i64, era: usize) -> Self[src]

Creates a new DateTime object.

pub fn from_date(
    calendar: &Calendar,
    year: i64,
    month: u32,
    day: u32
) -> Result<Self, DateTimeError>
[src]

Creates a DateTime from a date in a given calendar.

pub fn with_calendar<'a>(self, calendar: &'a Calendar) -> CalendarDateTime<'a>[src]

Augments this DateTime with a calendar, allowing it to be updated in relation to it.

Trait Implementations

impl Clone for DateTime[src]

impl Copy for DateTime[src]

impl Debug for DateTime[src]

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

impl Eq for DateTime[src]

impl Ord for DateTime[src]

impl PartialEq<DateTime> for DateTime[src]

impl PartialOrd<DateTime> for DateTime[src]

impl Serialize for DateTime[src]

impl StructuralEq for DateTime[src]

impl StructuralPartialEq for DateTime[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: for<'de> Deserialize<'de>, 
[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.