pub struct CNLabeledValue<ValueType> {
pub ptr: Id<Object>,
/* private fields */
}Expand description
An immutable object that combines a contact property value with a label that describes that property.
Fields§
§ptr: Id<Object>The raw pointer to the Objective-C object.
Implementations§
Source§impl<ValueType> CNLabeledValue<ValueType>
impl<ValueType> CNLabeledValue<ValueType>
Sourcepub fn init_with_label_value(
&mut self,
label: &NSString,
value: ValueType,
) -> Self
pub fn init_with_label_value( &mut self, label: &NSString, value: ValueType, ) -> Self
Returns a new labeled value identifier.
Sourcepub fn labeled_value_with_label_value(
label: &NSString,
value: ValueType,
) -> Self
pub fn labeled_value_with_label_value( label: &NSString, value: ValueType, ) -> Self
Returns a new labeled value identifier.
Sourcepub fn labeled_value_by_setting_label(&self, label: &NSString) -> Self
pub fn labeled_value_by_setting_label(&self, label: &NSString) -> Self
Returns a labeled value object with an existing value and identifier.
Sourcepub fn labeled_value_by_setting_label_value(
&self,
label: &NSString,
value: ValueType,
) -> Self
pub fn labeled_value_by_setting_label_value( &self, label: &NSString, value: ValueType, ) -> Self
Returns a labeled value object with the specified label and value with the existing identifier.
Sourcepub fn labeled_value_by_setting_value(&self, value: ValueType) -> Self
pub fn labeled_value_by_setting_value(&self, value: ValueType) -> Self
Returns a new value for an existing label and identifier.
Sourcepub fn localized_string_for_label(label: &NSString) -> NSString
pub fn localized_string_for_label(label: &NSString) -> NSString
Returns a localized string for the specified label.
Sourcepub fn identifier(&self) -> NSString
pub fn identifier(&self) -> NSString
A unique identifier for the labeled value object.
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.