pub struct MonitorProxy { /* private fields */ }
Implementations§
Source§impl MonitorProxy
impl MonitorProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.net.reachability/Monitor.
Sourcepub fn take_event_stream(&self) -> MonitorEventStream
pub fn take_event_stream(&self) -> MonitorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_options(&self, payload: &MonitorOptions) -> Result<(), Error>
pub fn set_options(&self, payload: &MonitorOptions) -> Result<(), Error>
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.
Sourcepub fn watch(&self) -> QueryResponseFut<Snapshot, DefaultFuchsiaResourceDialect>
pub fn watch(&self) -> QueryResponseFut<Snapshot, DefaultFuchsiaResourceDialect>
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.
Trait Implementations§
Source§impl Clone for MonitorProxy
impl Clone for MonitorProxy
Source§fn clone(&self) -> MonitorProxy
fn clone(&self) -> MonitorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MonitorProxy
impl Debug for MonitorProxy
Source§impl MonitorProxyInterface for MonitorProxy
impl MonitorProxyInterface for MonitorProxy
type WatchResponseFut = QueryResponseFut<Snapshot>
fn set_options(&self, payload: &MonitorOptions) -> Result<(), Error>
fn watch(&self) -> Self::WatchResponseFut
Source§impl Proxy for MonitorProxy
impl Proxy for MonitorProxy
Source§type Protocol = MonitorMarker
type Protocol = MonitorMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for MonitorProxy
impl !RefUnwindSafe for MonitorProxy
impl Send for MonitorProxy
impl Sync for MonitorProxy
impl Unpin for MonitorProxy
impl !UnwindSafe for MonitorProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)