pub struct SvcDirectoryWatcherSynchronousProxy { /* private fields */ }
Implementations§
Source§impl SvcDirectoryWatcherSynchronousProxy
impl SvcDirectoryWatcherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SvcDirectoryWatcherEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SvcDirectoryWatcherEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn watch_service_directory(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<HostPort>, Error>
pub fn watch_service_directory( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<HostPort>, Error>
Returns a vector of HostPorts for the watched endpoint ID.
First call returns the current list of HostPorts or blocks until the list is available from the service. Subsequent calls will block until a new ServiceDirectory lookup is made and will return the list associated with the watched endpoint ID, which may or may not be the same as prior values.
Calling WatchServiceDirectory when a previous call is still pending will
cause the channel to be closed with ZX_ERR_BAD_STATE
.
Trait Implementations§
Source§impl SynchronousProxy for SvcDirectoryWatcherSynchronousProxy
impl SynchronousProxy for SvcDirectoryWatcherSynchronousProxy
Source§type Proxy = SvcDirectoryWatcherProxy
type Proxy = SvcDirectoryWatcherProxy
The async proxy for the same protocol.
Source§type Protocol = SvcDirectoryWatcherMarker
type Protocol = SvcDirectoryWatcherMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for SvcDirectoryWatcherSynchronousProxy
impl RefUnwindSafe for SvcDirectoryWatcherSynchronousProxy
impl Send for SvcDirectoryWatcherSynchronousProxy
impl Sync for SvcDirectoryWatcherSynchronousProxy
impl Unpin for SvcDirectoryWatcherSynchronousProxy
impl UnwindSafe for SvcDirectoryWatcherSynchronousProxy
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