pub struct CFCalendar { /* private fields */ }
Available on crate feature
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>>
Available on crate feature
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>>
Available on crate feature
CFDate
only.pub fn set_time_zone(&self, tz: Option<&CFTimeZone>)
Available on crate feature
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
Available on crate feature
CFDate
only.pub fn ordinality_of_unit( &self, smaller_unit: CFCalendarUnit, bigger_unit: CFCalendarUnit, at: CFAbsoluteTime, ) -> CFIndex
Available on crate feature
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
startp
must be a valid pointer.tip
must 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 CFNumber
s, small CFString
s 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
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
The Objective-C type-encoding for a reference of this type. Read more
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,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
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,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
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,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for CFCalendar
Auto Trait Implementations§
impl !Freeze for CFCalendar
impl !RefUnwindSafe for CFCalendar
impl !Send for CFCalendar
impl !Sync for CFCalendar
impl !Unpin for CFCalendar
impl !UnwindSafe for CFCalendar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more