pub struct CFCalendar { /* private fields */ }CFCalendar only.Expand description
This is toll-free bridged with NSCalendar.
Implementations§
Source§impl CFCalendar
impl CFCalendar
pub fn current() -> Option<CFRetained<CFCalendar>>
Sourcepub fn with_identifier(
allocator: Option<&CFAllocator>,
identifier: Option<&CFCalendarIdentifier>,
) -> Option<CFRetained<CFCalendar>>
Available on crate feature CFLocale only.
pub fn with_identifier( allocator: Option<&CFAllocator>, identifier: Option<&CFCalendarIdentifier>, ) -> Option<CFRetained<CFCalendar>>
CFLocale only.Creates a calendar. The identifiers are the kCF*Calendar constants in CFLocale.h.
Sourcepub fn identifier(&self) -> Option<CFRetained<CFCalendarIdentifier>>
Available on crate feature CFLocale only.
pub fn identifier(&self) -> Option<CFRetained<CFCalendarIdentifier>>
CFLocale only.Returns the calendar’s identifier.
pub fn locale(&self) -> Option<CFRetained<CFLocale>>
CFLocale only.Sourcepub unsafe fn set_locale(&self, locale: Option<&CFLocale>)
Available on crate feature CFLocale only.
pub unsafe fn set_locale(&self, locale: Option<&CFLocale>)
CFLocale only.§Safety
locale might not allow None.
pub fn time_zone(&self) -> Option<CFRetained<CFTimeZone>>
CFDate only.pub fn set_time_zone(&self, tz: Option<&CFTimeZone>)
CFDate only.pub fn first_weekday(&self) -> CFIndex
pub fn set_first_weekday(&self, wkdy: CFIndex)
pub fn minimum_days_in_first_week(&self) -> CFIndex
pub fn set_minimum_days_in_first_week(&self, mwd: CFIndex)
Source§impl CFCalendar
impl CFCalendar
pub fn minimum_range_of_unit(&self, unit: CFCalendarUnit) -> CFRange
pub fn maximum_range_of_unit(&self, unit: CFCalendarUnit) -> CFRange
pub fn range_of_unit( &self, smaller_unit: CFCalendarUnit, bigger_unit: CFCalendarUnit, at: CFAbsoluteTime, ) -> CFRange
CFDate only.pub fn ordinality_of_unit( &self, smaller_unit: CFCalendarUnit, bigger_unit: CFCalendarUnit, at: CFAbsoluteTime, ) -> CFIndex
CFDate only.Sourcepub unsafe fn time_range_of_unit(
&self,
unit: CFCalendarUnit,
at: CFAbsoluteTime,
startp: *mut CFAbsoluteTime,
tip: *mut CFTimeInterval,
) -> bool
Available on crate feature CFDate only.
pub unsafe fn time_range_of_unit( &self, unit: CFCalendarUnit, at: CFAbsoluteTime, startp: *mut CFAbsoluteTime, tip: *mut CFTimeInterval, ) -> bool
CFDate only.§Safety
startpmust be a valid pointer.tipmust be a valid pointer.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
pub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CFCalendar
impl AsRef<AnyObject> for CFCalendar
Source§impl AsRef<CFCalendar> for CFCalendar
impl AsRef<CFCalendar> for CFCalendar
Source§impl AsRef<CFType> for CFCalendar
impl AsRef<CFType> for CFCalendar
Source§impl Borrow<AnyObject> for CFCalendar
impl Borrow<AnyObject> for CFCalendar
Source§impl Borrow<CFType> for CFCalendar
impl Borrow<CFType> for CFCalendar
Source§impl ConcreteType for CFCalendar
impl ConcreteType for CFCalendar
Source§impl Debug for CFCalendar
impl Debug for CFCalendar
Source§impl Deref for CFCalendar
impl Deref for CFCalendar
impl Eq for CFCalendar
Source§impl Hash for CFCalendar
impl Hash for CFCalendar
Source§impl Message for CFCalendar
impl Message for CFCalendar
Source§impl PartialEq for CFCalendar
impl PartialEq for CFCalendar
Source§impl RefEncode for CFCalendar
impl RefEncode for CFCalendar
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CFCalendar
impl Type for CFCalendar
Source§fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
this is redundant
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
use CFRetained::retain
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
this is redundant (CF types deref to CFType)
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
use CFRetained::from_raw
core-foundation crate. Read more