#[repr(C)]pub struct CFLocale { /* private fields */ }
Available on crate feature
CFLocale
only.Expand description
Implementations§
Source§impl CFLocale
impl CFLocale
pub fn system() -> Option<CFRetained<CFLocale>>
pub fn current() -> Option<CFRetained<CFLocale>>
pub fn available_locale_identifiers() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn iso_language_codes() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn iso_country_codes() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn iso_currency_codes() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn common_iso_currency_codes() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn preferred_languages() -> Option<CFRetained<CFArray>>
Available on crate feature
CFArray
only.pub fn new_canonical_language_identifier_from_string( allocator: Option<&CFAllocator>, locale_identifier: Option<&CFString>, ) -> Option<CFRetained<CFLocaleIdentifier>>
pub fn new_canonical_locale_identifier_from_string( allocator: Option<&CFAllocator>, locale_identifier: Option<&CFString>, ) -> Option<CFRetained<CFLocaleIdentifier>>
pub fn new_canonical_locale_identifier_from_script_manager_codes( allocator: Option<&CFAllocator>, lcode: i16, rcode: i16, ) -> Option<CFRetained<CFLocaleIdentifier>>
pub fn new_locale_identifier_from_windows_locale_code( allocator: Option<&CFAllocator>, lcid: u32, ) -> Option<CFRetained<CFLocaleIdentifier>>
pub fn windows_locale_code_from_locale_identifier( locale_identifier: Option<&CFLocaleIdentifier>, ) -> u32
Source§impl CFLocale
impl CFLocale
pub fn language_character_direction( iso_lang_code: Option<&CFString>, ) -> CFLocaleLanguageDirection
pub fn language_line_direction( iso_lang_code: Option<&CFString>, ) -> CFLocaleLanguageDirection
pub fn new_components_from_locale_identifier( allocator: Option<&CFAllocator>, locale_id: Option<&CFLocaleIdentifier>, ) -> Option<CFRetained<CFDictionary>>
Available on crate feature
CFDictionary
only.pub unsafe fn new_locale_identifier_from_components( allocator: Option<&CFAllocator>, dictionary: Option<&CFDictionary>, ) -> Option<CFRetained<CFLocaleIdentifier>>
Available on crate feature
CFDictionary
only.pub fn new( allocator: Option<&CFAllocator>, locale_identifier: Option<&CFLocaleIdentifier>, ) -> Option<CFRetained<CFLocale>>
pub fn new_copy( allocator: Option<&CFAllocator>, locale: Option<&CFLocale>, ) -> Option<CFRetained<CFLocale>>
pub fn identifier(self: &CFLocale) -> Option<CFRetained<CFLocaleIdentifier>>
pub fn value( self: &CFLocale, key: Option<&CFLocaleKey>, ) -> Option<CFRetained<CFType>>
pub fn display_name_for_property_value( self: &CFLocale, key: Option<&CFLocaleKey>, value: Option<&CFString>, ) -> Option<CFRetained<CFString>>
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 ConcreteType for CFLocale
impl ConcreteType for CFLocale
Source§impl RefEncode for CFLocale
impl RefEncode for CFLocale
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 CFLocale
impl Type for CFLocale
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 CFLocale
impl Send for CFLocale
impl Sync for CFLocale
Auto Trait Implementations§
impl !Freeze for CFLocale
impl !RefUnwindSafe for CFLocale
impl !Unpin for CFLocale
impl !UnwindSafe for CFLocale
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