pub struct CFDateFormatter { /* private fields */ }Available on crate feature
CFDateFormatter only.Expand description
Implementations§
Source§impl CFDateFormatter
impl CFDateFormatter
Sourcepub unsafe fn new_date_format_from_template(
allocator: Option<&CFAllocator>,
tmplate: Option<&CFString>,
options: CFOptionFlags,
locale: Option<&CFLocale>,
) -> Option<CFRetained<CFString>>
Available on crate feature CFLocale only.
pub unsafe fn new_date_format_from_template( allocator: Option<&CFAllocator>, tmplate: Option<&CFString>, options: CFOptionFlags, locale: Option<&CFLocale>, ) -> Option<CFRetained<CFString>>
CFLocale only.§Safety
allocatormight not allowNone.tmplatemight not allowNone.localemight not allowNone.
Source§impl CFDateFormatter
impl CFDateFormatter
Sourcepub unsafe fn new_iso_8601_formatter(
allocator: Option<&CFAllocator>,
format_options: CFISO8601DateFormatOptions,
) -> Option<CFRetained<CFDateFormatter>>
pub unsafe fn new_iso_8601_formatter( allocator: Option<&CFAllocator>, format_options: CFISO8601DateFormatOptions, ) -> Option<CFRetained<CFDateFormatter>>
§Safety
allocator might not allow None.
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
locale: Option<&CFLocale>,
date_style: CFDateFormatterStyle,
time_style: CFDateFormatterStyle,
) -> Option<CFRetained<CFDateFormatter>>
Available on crate feature CFLocale only.
pub unsafe fn new( allocator: Option<&CFAllocator>, locale: Option<&CFLocale>, date_style: CFDateFormatterStyle, time_style: CFDateFormatterStyle, ) -> Option<CFRetained<CFDateFormatter>>
CFLocale only.§Safety
allocatormight not allowNone.localemight not allowNone.
pub fn locale(&self) -> Option<CFRetained<CFLocale>>
Available on crate feature
CFLocale only.pub fn date_style(&self) -> CFDateFormatterStyle
pub fn time_style(&self) -> CFDateFormatterStyle
pub fn format(&self) -> Option<CFRetained<CFString>>
Sourcepub unsafe fn set_format(&self, format_string: Option<&CFString>)
pub unsafe fn set_format(&self, format_string: Option<&CFString>)
§Safety
format_string might not allow None.
Sourcepub unsafe fn new_string_with_date(
allocator: Option<&CFAllocator>,
formatter: Option<&CFDateFormatter>,
date: Option<&CFDate>,
) -> Option<CFRetained<CFString>>
Available on crate feature CFDate only.
pub unsafe fn new_string_with_date( allocator: Option<&CFAllocator>, formatter: Option<&CFDateFormatter>, date: Option<&CFDate>, ) -> Option<CFRetained<CFString>>
CFDate only.§Safety
allocatormight not allowNone.formattermight not allowNone.datemight not allowNone.
Sourcepub unsafe fn new_string_with_absolute_time(
allocator: Option<&CFAllocator>,
formatter: Option<&CFDateFormatter>,
at: CFAbsoluteTime,
) -> Option<CFRetained<CFString>>
Available on crate feature CFDate only.
pub unsafe fn new_string_with_absolute_time( allocator: Option<&CFAllocator>, formatter: Option<&CFDateFormatter>, at: CFAbsoluteTime, ) -> Option<CFRetained<CFString>>
CFDate only.§Safety
allocatormight not allowNone.formattermight not allowNone.
Sourcepub unsafe fn new_date_from_string(
allocator: Option<&CFAllocator>,
formatter: Option<&CFDateFormatter>,
string: Option<&CFString>,
rangep: *mut CFRange,
) -> Option<CFRetained<CFDate>>
Available on crate feature CFDate only.
pub unsafe fn new_date_from_string( allocator: Option<&CFAllocator>, formatter: Option<&CFDateFormatter>, string: Option<&CFString>, rangep: *mut CFRange, ) -> Option<CFRetained<CFDate>>
CFDate only.§Safety
allocatormight not allowNone.formattermight not allowNone.stringmight not allowNone.rangepmust be a valid pointer.
Sourcepub unsafe fn absolute_time_from_string(
&self,
string: Option<&CFString>,
rangep: *mut CFRange,
atp: *mut CFAbsoluteTime,
) -> bool
Available on crate feature CFDate only.
pub unsafe fn absolute_time_from_string( &self, string: Option<&CFString>, rangep: *mut CFRange, atp: *mut CFAbsoluteTime, ) -> bool
CFDate only.§Safety
stringmight not allowNone.rangepmust be a valid pointer.atpmust be a valid pointer.
Sourcepub unsafe fn set_property(
&self,
key: Option<&CFString>,
value: Option<&CFType>,
)
pub unsafe fn set_property( &self, key: Option<&CFString>, value: Option<&CFType>, )
§Safety
keymight not allowNone.valueshould be of the correct type.valuemight not allowNone.
Sourcepub unsafe fn property(
&self,
key: Option<&CFDateFormatterKey>,
) -> Option<CFRetained<CFType>>
pub unsafe fn property( &self, key: Option<&CFDateFormatterKey>, ) -> Option<CFRetained<CFType>>
§Safety
key might not allow None.
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 CFDateFormatter
impl AsRef<AnyObject> for CFDateFormatter
Source§impl AsRef<CFDateFormatter> for CFDateFormatter
impl AsRef<CFDateFormatter> for CFDateFormatter
Source§impl AsRef<CFType> for CFDateFormatter
impl AsRef<CFType> for CFDateFormatter
Source§impl Borrow<AnyObject> for CFDateFormatter
impl Borrow<AnyObject> for CFDateFormatter
Source§impl Borrow<CFType> for CFDateFormatter
impl Borrow<CFType> for CFDateFormatter
Source§impl ConcreteType for CFDateFormatter
impl ConcreteType for CFDateFormatter
Source§impl Debug for CFDateFormatter
impl Debug for CFDateFormatter
Source§impl Deref for CFDateFormatter
impl Deref for CFDateFormatter
Source§impl Hash for CFDateFormatter
impl Hash for CFDateFormatter
Source§impl Message for CFDateFormatter
impl Message for CFDateFormatter
Source§impl PartialEq for CFDateFormatter
impl PartialEq for CFDateFormatter
Source§impl RefEncode for CFDateFormatter
impl RefEncode for CFDateFormatter
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 CFDateFormatter
impl Type for CFDateFormatter
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 CFDateFormatter
Auto Trait Implementations§
impl !Freeze for CFDateFormatter
impl !RefUnwindSafe for CFDateFormatter
impl !Send for CFDateFormatter
impl !Sync for CFDateFormatter
impl !Unpin for CFDateFormatter
impl !UnwindSafe for CFDateFormatter
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