pub struct PortWatcherProxy { /* private fields */ }Implementations§
Source§impl PortWatcherProxy
impl PortWatcherProxy
Sourcepub fn new(channel: Channel) -> Self
pub fn new(channel: Channel) -> Self
Create a new Proxy for fuchsia.hardware.network/PortWatcher.
Sourcepub fn take_event_stream(&self) -> PortWatcherEventStream
pub fn take_event_stream(&self) -> PortWatcherEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch(&self) -> QueryResponseFut<DevicePortEvent, FDomainResourceDialect>
pub fn watch(&self) -> QueryResponseFut<DevicePortEvent, FDomainResourceDialect>
Get the next port event.
The first N calls return [DevicePortEvent.existing] where N is the
number of ports present on the device at the time of the watcher’s
creation. The next call returns [DevicePortEvent.idle] to indicate the
end of existing ports. Subsequent calls block until a port is added
([DevicePortEvent.added]) or removed ([DevicePortEvent.removed]).
The server closes the PortWatcher channel with ZX_ERR_CANCELED if
the number of unread events reaches a server-selected limit that is at
least two times MAX_PORTS. Clients are encouraged to maintain a
hanging call to Watch at all times to avoid triggering this condition.
- response
eventnext port event.
Trait Implementations§
Source§impl Clone for PortWatcherProxy
impl Clone for PortWatcherProxy
Source§fn clone(&self) -> PortWatcherProxy
fn clone(&self) -> PortWatcherProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PortWatcherProxy
impl Debug for PortWatcherProxy
Source§impl PortWatcherProxyInterface for PortWatcherProxy
impl PortWatcherProxyInterface for PortWatcherProxy
type WatchResponseFut = QueryResponseFut<DevicePortEvent, FDomainResourceDialect>
fn watch(&self) -> Self::WatchResponseFut
Source§impl Proxy for PortWatcherProxy
impl Proxy for PortWatcherProxy
Source§type Protocol = PortWatcherMarker
type Protocol = PortWatcherMarker
Proxy controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Source§fn into_channel(self) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Source§fn domain(&self) -> Arc<Client>
fn domain(&self) -> Arc<Client>
Source§fn on_closed(&self) -> OnFDomainSignals
fn on_closed(&self) -> OnFDomainSignals
PEER_CLOSED signal.Auto Trait Implementations§
impl Freeze for PortWatcherProxy
impl !RefUnwindSafe for PortWatcherProxy
impl Send for PortWatcherProxy
impl Sync for PortWatcherProxy
impl Unpin for PortWatcherProxy
impl UnsafeUnpin for PortWatcherProxy
impl !UnwindSafe for PortWatcherProxy
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]