pub struct ClientProxy { /* private fields */ }
Implementations§
Source§impl ClientProxy
impl ClientProxy
Sourcepub fn take_event_stream(&self) -> ClientEventStream
pub fn take_event_stream(&self) -> ClientEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_servers(
&self,
) -> QueryResponseFut<Vec<DnsServer_>, DefaultFuchsiaResourceDialect>
pub fn watch_servers( &self, ) -> QueryResponseFut<Vec<DnsServer_>, DefaultFuchsiaResourceDialect>
Returns a list of DNS servers.
First call always returns a snapshot of the current list of servers or blocks if an empty list would be returned. Subsequent calls will block until the list of servers changes.
The list of servers changes over time by configuration or network topology changes,
expiration, etc. Callers must repeatedly call WatchServers
and replace any previously
returned servers
with new ones to avoid using stale or expired entries.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
servers
The list of servers to use for DNS resolution, in priority order.
Sourcepub fn watch_address(
&self,
) -> QueryResponseFut<(Subnet, AddressParameters, ServerEnd<AddressStateProviderMarker>), DefaultFuchsiaResourceDialect>
pub fn watch_address( &self, ) -> QueryResponseFut<(Subnet, AddressParameters, ServerEnd<AddressStateProviderMarker>), DefaultFuchsiaResourceDialect>
Returns an address and its parameters.
Yields a value for every address acquired by the client.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
address
the assigned address. - response
address_parameters
the parameters of the address. - response
address_state_provider
provides address assignment state and enables updating address properties; client end is closed if the address becomes invalid (its valid lifetime expires and Renew and Rebind fail).
Sourcepub fn watch_prefixes(
&self,
) -> QueryResponseFut<Vec<Prefix>, DefaultFuchsiaResourceDialect>
pub fn watch_prefixes( &self, ) -> QueryResponseFut<Vec<Prefix>, DefaultFuchsiaResourceDialect>
Hanging get for prefix leases.
The first call to this method will return when there is at least one lease to report (the first call is guaranteed to return with a non-empty vector). Subsequent calls will return immediately if there is a change to report, or block until a change occurs.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
prefixes
the assigned prefixes and their lifetimes.
Sourcepub fn shutdown(
&self,
) -> QueryResponseFut<ClientShutdownResult, DefaultFuchsiaResourceDialect>
pub fn shutdown( &self, ) -> QueryResponseFut<ClientShutdownResult, DefaultFuchsiaResourceDialect>
Gracefully tears down the underlying object.
Blocks until any held addresses are gracefully released, as described in RFC 8415, Section 18.2.7.
The server end of the protocol is closed after this method returns.
- error a
zx.Status
if any of the addresses were not gracefully released, e.g. the client times out waiting for Reply to Release, or the interface is down and sending Release fails.
Trait Implementations§
Source§impl ClientProxyInterface for ClientProxy
impl ClientProxyInterface for ClientProxy
type WatchServersResponseFut = QueryResponseFut<Vec<DnsServer_>>
type WatchAddressResponseFut = QueryResponseFut<(Subnet, AddressParameters, ServerEnd<AddressStateProviderMarker>)>
type WatchPrefixesResponseFut = QueryResponseFut<Vec<Prefix>>
type ShutdownResponseFut = QueryResponseFut<Result<(), i32>>
fn watch_servers(&self) -> Self::WatchServersResponseFut
fn watch_address(&self) -> Self::WatchAddressResponseFut
fn watch_prefixes(&self) -> Self::WatchPrefixesResponseFut
fn shutdown(&self) -> Self::ShutdownResponseFut
Source§impl Clone for ClientProxy
impl Clone for ClientProxy
Source§fn clone(&self) -> ClientProxy
fn clone(&self) -> ClientProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientProxy
impl Debug for ClientProxy
Source§impl Proxy for ClientProxy
impl Proxy for ClientProxy
Source§type Protocol = ClientMarker
type Protocol = ClientMarker
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 ClientProxy
impl !RefUnwindSafe for ClientProxy
impl Send for ClientProxy
impl Sync for ClientProxy
impl Unpin for ClientProxy
impl !UnwindSafe for ClientProxy
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
)