Skip to main content

NSObjectNSKeyValueObserving

Trait NSObjectNSKeyValueObserving 

Source
pub unsafe trait NSObjectNSKeyValueObserving:
    ClassType
    + Sized
    + Sealed {
    // Provided method
    unsafe fn observeValueForKeyPath_ofObject_change_context(
        &self,
        key_path: Option<&NSString>,
        object: Option<&AnyObject>,
        change: Option<&NSDictionary<NSKeyValueChangeKey, AnyObject>>,
        context: *mut c_void,
    ) { ... }
}
Available on crate feature NSKeyValueObserving only.
Expand description

Category “NSKeyValueObserving” on NSObject.

Provided Methods§

Source

unsafe fn observeValueForKeyPath_ofObject_change_context( &self, key_path: Option<&NSString>, object: Option<&AnyObject>, change: Option<&NSDictionary<NSKeyValueChangeKey, AnyObject>>, context: *mut c_void, )

Available on crate features NSDictionary and NSString only.
§Safety
  • object should be of the correct type.
  • change generic should be of the correct type.
  • context must be a valid pointer or null.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§