Skip to main content

Date

Struct Date 

Source
pub struct Date(/* private fields */);

Implementations§

Source§

impl Date

Source

pub fn retained(&self) -> R<Self>

Source§

impl Date

Source

pub fn type_id() -> TypeId

Source

pub fn new_at_in(at: AbsTime, allocator: Option<&Allocator>) -> Option<R<Self>>

Source

pub fn new_at(at: AbsTime) -> R<Self>

Source

pub fn new() -> R<Self>

Source

pub fn now() -> R<Self>

Source

pub fn abs_time(&self) -> AbsTime

Source

pub fn time_interval_since_date(&self, other_date: &Date) -> TimeInterval

Source

pub unsafe fn compare( &self, other_date: &Date, context: *mut c_void, ) -> ComparisonResult

Source

pub fn as_ns(&self) -> &Date

Methods from Deref<Target = Type>§

Source

pub fn get_type_id(&self) -> TypeId

Source

pub unsafe fn as_type_ptr(&self) -> *const c_void

Source

pub fn as_type_ref(&self) -> &Type

Source

pub fn is_tagged_ptr(&self) -> bool

Source

pub fn try_as_number(&self) -> Option<&Number>

Source

pub fn try_as_string(&self) -> Option<&String>

Source

pub fn show(&self)

Source

pub fn allocator(&self) -> Option<&Allocator>

Source

pub fn retain_count(&self) -> isize

Source

pub fn equal(&self, other: &Type) -> bool

use cidre::cf;

let n1 = cf::Number::from_i8(4);
let n2 = cf::Number::from_i32(4);
let n3 = cf::Number::from_f64(3.0);

assert!(n1.equal(&n2));
assert_eq!(false, n1.equal(&n3));
Source

pub fn hash(&self) -> usize

Source

pub fn desc(&self) -> R<String>

Trait Implementations§

Source§

impl AsRef<Type> for Date

Source§

fn as_ref(&self) -> &Type

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Date

Source§

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

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

impl Deref for Date

Source§

type Target = Type

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Date

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Eq for Date

Source§

impl PartialEq for Date

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Date

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Release for Date

Source§

unsafe fn release(&mut self)

Source§

impl Retain for Date

Source§

fn retained(&self) -> R<Self>

Auto Trait Implementations§

§

impl !Send for Date

§

impl !Sync for Date

§

impl Freeze for Date

§

impl RefUnwindSafe for Date

§

impl Unpin for Date

§

impl UnsafeUnpin for Date

§

impl UnwindSafe for Date

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.