pub enum RegistryRequest {
WatchDevicesAdded {
responder: RegistryWatchDevicesAddedResponder,
},
WatchDeviceRemoved {
responder: RegistryWatchDeviceRemovedResponder,
},
CreateObserver {
payload: RegistryCreateObserverRequest,
responder: RegistryCreateObserverResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: RegistryControlHandle,
method_type: MethodType,
},
}
Expand description
Registry
instances notify clients as devices arrive and depart, and they
create observers (see Observer
) that notify of more detailed state changes.
Variants§
WatchDevicesAdded
Register for notification when one or more devices are added.
The devices
vector will always contain at least one Info
entry.
Fields
§
responder: RegistryWatchDevicesAddedResponder
WatchDeviceRemoved
Register for notification when an (active, added) device is removed.
Because the method only notifies of one removal, upon completion it
should immediately be re-called, in case other removals have occurred.
Calls to this method will pend until the removal of a device that was
included in a previous WatchDevicesAdded
response.
Fields
§
responder: RegistryWatchDeviceRemovedResponder
CreateObserver
Request an Observer
for the specified device.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: RegistryControlHandle
§
method_type: MethodType
Implementations§
Source§impl RegistryRequest
impl RegistryRequest
pub fn into_watch_devices_added( self, ) -> Option<RegistryWatchDevicesAddedResponder>
pub fn into_watch_device_removed( self, ) -> Option<RegistryWatchDeviceRemovedResponder>
pub fn into_create_observer( self, ) -> Option<(RegistryCreateObserverRequest, RegistryCreateObserverResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegistryRequest
impl !RefUnwindSafe for RegistryRequest
impl Send for RegistryRequest
impl Sync for RegistryRequest
impl Unpin for RegistryRequest
impl !UnwindSafe for RegistryRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more