pub unsafe extern "C-unwind" fn MTLCopyAllDevicesWithObserver(
observer: NonNull<*mut ProtocolObject<dyn NSObjectProtocol>>,
handler: MTLDeviceNotificationHandler,
) -> Retained<NSArray<ProtocolObject<dyn MTLDevice>>>Available on crate features
MTLDevice and block2 only.Expand description
Returns an NSArray of the current set of available Metal devices and installs a notification handler to be notified of any further changes (additions, removals, etc.). The observer return value is retained by Metal and may be passed to MTLRemoveDeviceObserver() if the application no longer wishes to receive notifications.
Note: The observer out parameter is returned with a +1 retain count in addition to the retain mentioned above.
ยงSafety
observermust be a valid pointer.handlermust be a valid pointer.