#[repr(C)]pub struct CFNumberFormatter { /* private fields */ }
Available on crate feature
CFNumberFormatter
only.Expand description
Implementations§
Source§impl CFNumberFormatter
impl CFNumberFormatter
pub unsafe fn new( allocator: Option<&CFAllocator>, locale: Option<&CFLocale>, style: CFNumberFormatterStyle, ) -> Option<CFRetained<CFNumberFormatter>>
Available on crate feature
CFLocale
only.pub unsafe fn locale(self: &CFNumberFormatter) -> Option<CFRetained<CFLocale>>
Available on crate feature
CFLocale
only.pub unsafe fn style(self: &CFNumberFormatter) -> CFNumberFormatterStyle
pub unsafe fn format(self: &CFNumberFormatter) -> Option<CFRetained<CFString>>
pub unsafe fn set_format( self: &CFNumberFormatter, format_string: Option<&CFString>, )
pub unsafe fn new_string_with_number( allocator: Option<&CFAllocator>, formatter: Option<&CFNumberFormatter>, number: Option<&CFNumber>, ) -> Option<CFRetained<CFString>>
Available on crate feature
CFNumber
only.pub unsafe fn new_string_with_value( allocator: Option<&CFAllocator>, formatter: Option<&CFNumberFormatter>, number_type: CFNumberType, value_ptr: *const c_void, ) -> Option<CFRetained<CFString>>
Available on crate feature
CFNumber
only.Source§impl CFNumberFormatter
impl CFNumberFormatter
pub unsafe fn new_number_from_string( allocator: Option<&CFAllocator>, formatter: Option<&CFNumberFormatter>, string: Option<&CFString>, rangep: *mut CFRange, options: CFOptionFlags, ) -> Option<CFRetained<CFNumber>>
Available on crate feature
CFNumber
only.pub unsafe fn value_from_string( self: &CFNumberFormatter, string: Option<&CFString>, rangep: *mut CFRange, number_type: CFNumberType, value_ptr: *mut c_void, ) -> bool
Available on crate feature
CFNumber
only.pub unsafe fn set_property( self: &CFNumberFormatter, key: Option<&CFNumberFormatterKey>, value: Option<&CFType>, )
pub unsafe fn property( self: &CFNumberFormatter, key: Option<&CFNumberFormatterKey>, ) -> Option<CFRetained<CFType>>
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 CFNumberFormatter
impl AsRef<AnyObject> for CFNumberFormatter
Source§impl AsRef<CFNumberFormatter> for CFNumberFormatter
impl AsRef<CFNumberFormatter> for CFNumberFormatter
Source§impl AsRef<CFType> for CFNumberFormatter
impl AsRef<CFType> for CFNumberFormatter
Source§impl Borrow<AnyObject> for CFNumberFormatter
impl Borrow<AnyObject> for CFNumberFormatter
Source§impl Borrow<CFType> for CFNumberFormatter
impl Borrow<CFType> for CFNumberFormatter
Source§impl ConcreteType for CFNumberFormatter
impl ConcreteType for CFNumberFormatter
Source§impl Debug for CFNumberFormatter
impl Debug for CFNumberFormatter
Source§impl Deref for CFNumberFormatter
impl Deref for CFNumberFormatter
Source§impl Hash for CFNumberFormatter
impl Hash for CFNumberFormatter
Source§impl Message for CFNumberFormatter
impl Message for CFNumberFormatter
Source§impl PartialEq for CFNumberFormatter
impl PartialEq for CFNumberFormatter
Source§impl RefEncode for CFNumberFormatter
impl RefEncode for CFNumberFormatter
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 CFNumberFormatter
impl Type for CFNumberFormatter
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 CFNumberFormatter
Auto Trait Implementations§
impl !Freeze for CFNumberFormatter
impl !RefUnwindSafe for CFNumberFormatter
impl !Send for CFNumberFormatter
impl !Sync for CFNumberFormatter
impl !Unpin for CFNumberFormatter
impl !UnwindSafe for CFNumberFormatter
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