Skip to main content

NSObjectNSKeyValueCoding

Trait NSObjectNSKeyValueCoding 

Source
pub unsafe trait NSObjectNSKeyValueCoding:
    ClassType
    + Sized
    + Sealed {
Show 18 methods // Provided methods fn accessInstanceVariablesDirectly() -> bool { ... } fn valueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>> { ... } unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString) { ... } unsafe fn validateValue_forKey_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key: &NSString, ) -> Result<(), Retained<NSError>> { ... } unsafe fn mutableArrayValueForKey( &self, key: &NSString, ) -> Retained<NSMutableArray> { ... } unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Retained<NSMutableOrderedSet> { ... } unsafe fn mutableSetValueForKey( &self, key: &NSString, ) -> Retained<NSMutableSet> { ... } fn valueForKeyPath( &self, key_path: &NSString, ) -> Option<Retained<AnyObject>> { ... } unsafe fn setValue_forKeyPath( &self, value: Option<&AnyObject>, key_path: &NSString, ) { ... } unsafe fn validateValue_forKeyPath_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key_path: &NSString, ) -> Result<(), Retained<NSError>> { ... } unsafe fn mutableArrayValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableArray> { ... } unsafe fn mutableOrderedSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableOrderedSet> { ... } unsafe fn mutableSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableSet> { ... } fn valueForUndefinedKey( &self, key: &NSString, ) -> Option<Retained<AnyObject>> { ... } unsafe fn setValue_forUndefinedKey( &self, value: Option<&AnyObject>, key: &NSString, ) { ... } unsafe fn setNilValueForKey(&self, key: &NSString) { ... } fn dictionaryWithValuesForKeys( &self, keys: &NSArray<NSString>, ) -> Retained<NSDictionary<NSString, AnyObject>> { ... } unsafe fn setValuesForKeysWithDictionary( &self, keyed_values: &NSDictionary<NSString, AnyObject>, ) { ... }
}
Available on crate feature NSKeyValueCoding only.
Expand description

Category “NSKeyValueCoding” on NSObject.

Provided Methods§

Source

fn accessInstanceVariablesDirectly() -> bool

Source

fn valueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>

Available on crate feature NSString only.
Source

unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)

Available on crate feature NSString only.
§Safety

value should be of the correct type.

Source

unsafe fn validateValue_forKey_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key: &NSString, ) -> Result<(), Retained<NSError>>

Available on crate features NSError and NSString only.
§Safety

io_value should be of the correct type.

Source

unsafe fn mutableArrayValueForKey( &self, key: &NSString, ) -> Retained<NSMutableArray>

Available on crate features NSArray and NSString only.
§Safety

The returned generic should be of the correct type.

Source

unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Retained<NSMutableOrderedSet>

Available on crate features NSOrderedSet and NSString only.
§Safety

The returned generic should be of the correct type.

Source

unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Retained<NSMutableSet>

Available on crate features NSSet and NSString only.
§Safety

The returned generic should be of the correct type.

Source

fn valueForKeyPath(&self, key_path: &NSString) -> Option<Retained<AnyObject>>

Available on crate feature NSString only.
Source

unsafe fn setValue_forKeyPath( &self, value: Option<&AnyObject>, key_path: &NSString, )

Available on crate feature NSString only.
§Safety

value should be of the correct type.

Source

unsafe fn validateValue_forKeyPath_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key_path: &NSString, ) -> Result<(), Retained<NSError>>

Available on crate features NSError and NSString only.
§Safety

io_value should be of the correct type.

Source

unsafe fn mutableArrayValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableArray>

Available on crate features NSArray and NSString only.
§Safety

The returned generic should be of the correct type.

Source

unsafe fn mutableOrderedSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableOrderedSet>

Available on crate features NSOrderedSet and NSString only.
§Safety

The returned generic should be of the correct type.

Source

unsafe fn mutableSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableSet>

Available on crate features NSSet and NSString only.
§Safety

The returned generic should be of the correct type.

Source

fn valueForUndefinedKey(&self, key: &NSString) -> Option<Retained<AnyObject>>

Available on crate feature NSString only.
Source

unsafe fn setValue_forUndefinedKey( &self, value: Option<&AnyObject>, key: &NSString, )

Available on crate feature NSString only.
§Safety

value should be of the correct type.

Source

unsafe fn setNilValueForKey(&self, key: &NSString)

Available on crate feature NSString only.
Source

fn dictionaryWithValuesForKeys( &self, keys: &NSArray<NSString>, ) -> Retained<NSDictionary<NSString, AnyObject>>

Available on crate features NSArray and NSDictionary and NSString only.
Source

unsafe fn setValuesForKeysWithDictionary( &self, keyed_values: &NSDictionary<NSString, AnyObject>, )

Available on crate features NSDictionary and NSString only.
§Safety

keyed_values generic should be of the correct type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§