pub unsafe trait NSObjectNSKeyValueSharedObserverRegistration:
ClassType
+ Sized
+ Sealed {
// Provided method
unsafe fn setSharedObservers(
&self,
shared_observers: Option<&NSKeyValueSharedObserversSnapshot>,
) { ... }
}
Available on crate feature
NSKeyValueSharedObservers
only.Expand description
Category “NSKeyValueSharedObserverRegistration” on NSObject
.
Provided Methods§
Register shared observations.
A shared observation collection might be shared between multiple observables
to minimise registration work. Shared observers remain registered throughout
the object’s lifetime and do not need to be removed using removeObserver:
.
An observable may only have one set of shared observations. Subsequent calls to this method will replace existing shared observations.
- Parameter sharedObservers: shared observer collection that was initialized with the class of this object
- Invariant:
sharedObserers
was initialized with the class of this object - Throws: Exception if the class of the receiving observable object does not
match the class with which
sharedObserers
was initialized.
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.