pub struct CFNumberFormatter(/* private fields */);Implementations§
Source§impl CFNumberFormatter
impl CFNumberFormatter
pub fn from_raw(ptr: *mut c_void) -> Option<Self>
Sourcepub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
Retain a borrowed pointer before wrapping it.
§Safety
ptr must be NULL or a valid pointer of the expected Core Foundation type.
pub const fn as_ptr(&self) -> *mut c_void
pub fn type_id() -> usize
pub fn into_cf_type(self) -> CFType
Source§impl CFNumberFormatter
impl CFNumberFormatter
Sourcepub fn new(locale: Option<&CFLocale>, style: CFNumberFormatterStyle) -> Self
pub fn new(locale: Option<&CFLocale>, style: CFNumberFormatterStyle) -> Self
Create a number formatter for the given locale and style.
Sourcepub fn format_number(&self, number: &CFNumber) -> CFString
pub fn format_number(&self, number: &CFNumber) -> CFString
Format a number into a string.
Sourcepub fn parse_number(&self, string: &CFString) -> Option<CFNumber>
pub fn parse_number(&self, string: &CFString) -> Option<CFNumber>
Parse a string into a Core Foundation number.
Trait Implementations§
Source§impl AsCFType for CFNumberFormatter
impl AsCFType for CFNumberFormatter
Source§impl Clone for CFNumberFormatter
impl Clone for CFNumberFormatter
Source§fn clone(&self) -> CFNumberFormatter
fn clone(&self) -> CFNumberFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CFNumberFormatter
impl Debug for CFNumberFormatter
Source§impl Hash for CFNumberFormatter
impl Hash for CFNumberFormatter
Source§impl PartialEq for CFNumberFormatter
impl PartialEq for CFNumberFormatter
Source§fn eq(&self, other: &CFNumberFormatter) -> bool
fn eq(&self, other: &CFNumberFormatter) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CFNumberFormatter
impl StructuralPartialEq 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 UnsafeUnpin 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