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§
fn accessInstanceVariablesDirectly() -> bool
fn valueForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>
Available on crate feature
NSString only.Sourceunsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)
Available on crate feature NSString only.
unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)
NSString only.§Safety
value should be of the correct type.
Sourceunsafe 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.
unsafe fn validateValue_forKey_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key: &NSString, ) -> Result<(), Retained<NSError>>
NSError and NSString only.§Safety
io_value should be of the correct type.
Sourceunsafe fn mutableArrayValueForKey(
&self,
key: &NSString,
) -> Retained<NSMutableArray>
Available on crate features NSArray and NSString only.
unsafe fn mutableArrayValueForKey( &self, key: &NSString, ) -> Retained<NSMutableArray>
NSArray and NSString only.§Safety
The returned generic should be of the correct type.
Sourceunsafe fn mutableOrderedSetValueForKey(
&self,
key: &NSString,
) -> Retained<NSMutableOrderedSet>
Available on crate features NSOrderedSet and NSString only.
unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Retained<NSMutableOrderedSet>
NSOrderedSet and NSString only.§Safety
The returned generic should be of the correct type.
Sourceunsafe fn mutableSetValueForKey(&self, key: &NSString) -> Retained<NSMutableSet>
Available on crate features NSSet and NSString only.
unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Retained<NSMutableSet>
NSSet and NSString only.§Safety
The returned generic should be of the correct type.
fn valueForKeyPath(&self, key_path: &NSString) -> Option<Retained<AnyObject>>
Available on crate feature
NSString only.Sourceunsafe fn setValue_forKeyPath(
&self,
value: Option<&AnyObject>,
key_path: &NSString,
)
Available on crate feature NSString only.
unsafe fn setValue_forKeyPath( &self, value: Option<&AnyObject>, key_path: &NSString, )
NSString only.§Safety
value should be of the correct type.
Sourceunsafe 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.
unsafe fn validateValue_forKeyPath_error( &self, io_value: &mut Option<Retained<AnyObject>>, in_key_path: &NSString, ) -> Result<(), Retained<NSError>>
NSError and NSString only.§Safety
io_value should be of the correct type.
Sourceunsafe fn mutableArrayValueForKeyPath(
&self,
key_path: &NSString,
) -> Retained<NSMutableArray>
Available on crate features NSArray and NSString only.
unsafe fn mutableArrayValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableArray>
NSArray and NSString only.§Safety
The returned generic should be of the correct type.
Sourceunsafe fn mutableOrderedSetValueForKeyPath(
&self,
key_path: &NSString,
) -> Retained<NSMutableOrderedSet>
Available on crate features NSOrderedSet and NSString only.
unsafe fn mutableOrderedSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableOrderedSet>
NSOrderedSet and NSString only.§Safety
The returned generic should be of the correct type.
Sourceunsafe fn mutableSetValueForKeyPath(
&self,
key_path: &NSString,
) -> Retained<NSMutableSet>
Available on crate features NSSet and NSString only.
unsafe fn mutableSetValueForKeyPath( &self, key_path: &NSString, ) -> Retained<NSMutableSet>
NSSet and NSString only.§Safety
The returned generic should be of the correct type.
fn valueForUndefinedKey(&self, key: &NSString) -> Option<Retained<AnyObject>>
Available on crate feature
NSString only.Sourceunsafe fn setValue_forUndefinedKey(
&self,
value: Option<&AnyObject>,
key: &NSString,
)
Available on crate feature NSString only.
unsafe fn setValue_forUndefinedKey( &self, value: Option<&AnyObject>, key: &NSString, )
NSString only.§Safety
value should be of the correct type.
unsafe fn setNilValueForKey(&self, key: &NSString)
Available on crate feature
NSString only.fn dictionaryWithValuesForKeys( &self, keys: &NSArray<NSString>, ) -> Retained<NSDictionary<NSString, AnyObject>>
Available on crate features
NSArray and NSDictionary and NSString only.Sourceunsafe fn setValuesForKeysWithDictionary(
&self,
keyed_values: &NSDictionary<NSString, AnyObject>,
)
Available on crate features NSDictionary and NSString only.
unsafe fn setValuesForKeysWithDictionary( &self, keyed_values: &NSDictionary<NSString, AnyObject>, )
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", so this trait is not object safe.