pub unsafe trait NSObjectNSKeyValueObserverRegistration:
ClassType
+ Sized
+ Sealed {
// Provided methods
unsafe fn addObserver_forKeyPath_options_context(
&self,
observer: &NSObject,
key_path: &NSString,
options: NSKeyValueObservingOptions,
context: *mut c_void,
) { ... }
unsafe fn removeObserver_forKeyPath_context(
&self,
observer: &NSObject,
key_path: &NSString,
context: *mut c_void,
) { ... }
unsafe fn removeObserver_forKeyPath(
&self,
observer: &NSObject,
key_path: &NSString,
) { ... }
}
Available on crate feature
NSKeyValueObserving
only.Expand description
Category “NSKeyValueObserverRegistration” on NSObject
.
Provided Methods§
Sourceunsafe fn addObserver_forKeyPath_options_context(
&self,
observer: &NSObject,
key_path: &NSString,
options: NSKeyValueObservingOptions,
context: *mut c_void,
)
Available on crate feature NSString
only.
unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, key_path: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, )
NSString
only.§Safety
observer
should be of the correct type.context
must be a valid pointer or null.
Sourceunsafe fn removeObserver_forKeyPath_context(
&self,
observer: &NSObject,
key_path: &NSString,
context: *mut c_void,
)
Available on crate feature NSString
only.
unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, key_path: &NSString, context: *mut c_void, )
NSString
only.§Safety
observer
should be of the correct type.context
must be a valid pointer or null.
Sourceunsafe fn removeObserver_forKeyPath(
&self,
observer: &NSObject,
key_path: &NSString,
)
Available on crate feature NSString
only.
unsafe fn removeObserver_forKeyPath( &self, observer: &NSObject, key_path: &NSString, )
NSString
only.§Safety
observer
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.