pub enum MonitorRequest {
SetOptions {
payload: MonitorOptions,
control_handle: MonitorControlHandle,
},
Watch {
responder: MonitorWatchResponder,
},
}Expand description
Provides snapshots of reachability state.
Variants§
SetOptions
Controls verbosity of results returned from calls to [Watch]. If
options are set via this method, it must be in the first call made
over the channel.
Calling this method after either it or [Watch] have already been
invoked will result in closing the channel. If this method is not
called before calling [Watch], Snapshot responses will not be
modified.
Watch
Hanging-get API for changes in network reachability state.
Watch returns a snapshot of the system’s most recent reachability
state information. The first call returns a current snapshot.
Subsequent calls to Watch block until the previously-observed state
changes.
While this API guarantees that any state returned was a valid network state at some point, it does not guarantee observation of every intermediate state.
It is not valid to call Watch concurrently. Calling Watch while
another call over the same server end is in flight will result in the
closing the channel.
- response a snapshot of current system reachability state.
Fields
responder: MonitorWatchResponderImplementations§
Source§impl MonitorRequest
impl MonitorRequest
pub fn into_set_options(self) -> Option<(MonitorOptions, MonitorControlHandle)>
pub fn into_watch(self) -> Option<MonitorWatchResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL