pub struct CFDatetime { /* private fields */ }

Implementations§

source§

impl CFDatetime

Immplementation of the CF convention specifications :

source

pub fn calendar(&self) -> Calendar

source

pub fn timestamp(&self) -> i64

source

pub fn ymd(&self) -> Result<(i64, u8, u8), Error>

source

pub fn hms(&self) -> Result<(u8, u8, u8), Error>

source

pub fn ymd_hms(&self) -> Result<(i64, u8, u8, u8, u8, u8), Error>

source

pub fn from_ymd_hms( year: i64, month: u8, day: u8, hour: u8, minute: u8, second: f32, calendar: Calendar ) -> Result<Self, Error>

source

pub fn from_hms( hour: u8, minute: u8, second: f32, calendar: Calendar ) -> Result<Self, Error>

source

pub fn from_ymd( year: i64, month: u8, day: u8, calendar: Calendar ) -> Result<Self, Error>

source

pub fn from_timestamp( timestamp: i64, nanoseconds: u32, calendar: Calendar ) -> Result<Self, Error>

source

pub fn hours(&self) -> Result<u8, Error>

source

pub fn minutes(&self) -> Result<u8, Error>

source

pub fn seconds(&self) -> Result<u8, Error>

source

pub fn nanoseconds(&self) -> u32

Trait Implementations§

source§

impl Add<&CFDuration> for &CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &CFDuration) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&CFDuration> for CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &CFDuration) -> Self::Output

Performs the + operation. Read more
source§

impl Add<CFDuration> for &CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the + operator.
source§

fn add(self, rhs: CFDuration) -> Self::Output

Performs the + operation. Read more
source§

impl Add<CFDuration> for CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the + operator.
source§

fn add(self, rhs: CFDuration) -> Self::Output

Performs the + operation. Read more
source§

impl CFEncoder<f32> for CFDatetime

source§

fn encode_cf(&self, units: &str, calendar: Calendar) -> Result<f32, Error>

source§

impl CFEncoder<f64> for CFDatetime

source§

fn encode_cf(&self, units: &str, calendar: Calendar) -> Result<f64, Error>

source§

impl CFEncoder<i32> for CFDatetime

source§

fn encode_cf(&self, units: &str, calendar: Calendar) -> Result<i32, Error>

source§

impl CFEncoder<i64> for CFDatetime

source§

fn encode_cf(&self, units: &str, calendar: Calendar) -> Result<i64, Error>

source§

impl Display for CFDatetime

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Sub<&CFDatetime> for &CFDatetime

§

type Output = CFDuration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &CFDatetime) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<&CFDatetime> for CFDatetime

§

type Output = CFDuration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &CFDatetime) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<&CFDuration> for &CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &CFDuration) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<&CFDuration> for CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &CFDuration) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<CFDatetime> for &CFDatetime

§

type Output = CFDuration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: CFDatetime) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<CFDuration> for &CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: CFDuration) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<CFDuration> for CFDatetime

§

type Output = Result<CFDatetime, Error>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: CFDuration) -> Self::Output

Performs the - operation. Read more
source§

impl Sub for CFDatetime

§

type Output = CFDuration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: CFDatetime) -> Self::Output

Performs the - operation. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Ungil for Twhere T: Send,