#[repr(C)]pub struct CNContactFormatter {
pub ptr: Id<Object>,
}
Expand description
An object that you use to format contact information before displaying it to the user.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl CNContactFormatter
impl CNContactFormatter
Sourcepub fn attributed_string_from_contact_default_attributes<K, V>(
&self,
contact: CNContact,
attributes: NSDictionary<K, V>,
) -> Option<NSAttributedString>
pub fn attributed_string_from_contact_default_attributes<K, V>( &self, contact: CNContact, attributes: NSDictionary<K, V>, ) -> Option<NSAttributedString>
Formats the contact name as an attributed string.
Sourcepub fn attributed_string_from_contact_style_default_attributes<K, V>(
contact: CNContact,
style: CNContactFormatterStyle,
attributes: NSDictionary<K, V>,
) -> Option<NSAttributedString>
pub fn attributed_string_from_contact_style_default_attributes<K, V>( contact: CNContact, style: CNContactFormatterStyle, attributes: NSDictionary<K, V>, ) -> Option<NSAttributedString>
Formats the contact name as an attributed string.
Sourcepub fn string_from_contact(&self, contact: CNContact) -> Option<NSString>
pub fn string_from_contact(&self, contact: CNContact) -> Option<NSString>
Formats the contact name.
Sourcepub fn string_from_contact_style(
contact: CNContact,
style: CNContactFormatterStyle,
) -> Option<NSString>
pub fn string_from_contact_style( contact: CNContact, style: CNContactFormatterStyle, ) -> Option<NSString>
Returns the contact name, formatted with the specified formatter.
Sourcepub fn style(&self) -> CNContactFormatterStyle
pub fn style(&self) -> CNContactFormatterStyle
The formatting style for the contact name.
Sourcepub fn set_style(&mut self) -> CNContactFormatterStyle
pub fn set_style(&mut self) -> CNContactFormatterStyle
Sets the formatting style for the contact name.
Sourcepub fn descriptor_for_required_keys_for_style(
style: CNContactFormatterStyle,
) -> id
pub fn descriptor_for_required_keys_for_style( style: CNContactFormatterStyle, ) -> id
Returns the required key descriptor for the specified formatting style of the contact.
Sourcepub fn delimiter_for_contact(contact: CNContact) -> NSString
pub fn delimiter_for_contact(contact: CNContact) -> NSString
Returns the delimiter to use between name components.
Sourcepub fn name_order_for_contact(contact: CNContact) -> CNContactDisplayNameOrder
pub fn name_order_for_contact(contact: CNContact) -> CNContactDisplayNameOrder
Returns the display name order.
pub fn descriptor_for_required_keys_for_delimiter() -> id
pub fn descriptor_for_required_keys_for_name_order() -> id
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.