pub struct DnsServerWatcherSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DnsServerWatcherSynchronousProxy
impl DnsServerWatcherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DnsServerWatcherEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DnsServerWatcherEvent, 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_servers(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<DnsServer_>, Error>
pub fn watch_servers( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<DnsServer_>, Error>
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.
Trait Implementations§
Source§impl SynchronousProxy for DnsServerWatcherSynchronousProxy
impl SynchronousProxy for DnsServerWatcherSynchronousProxy
Source§type Proxy = DnsServerWatcherProxy
type Proxy = DnsServerWatcherProxy
The async proxy for the same protocol.
Source§type Protocol = DnsServerWatcherMarker
type Protocol = DnsServerWatcherMarker
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 DnsServerWatcherSynchronousProxy
impl RefUnwindSafe for DnsServerWatcherSynchronousProxy
impl Send for DnsServerWatcherSynchronousProxy
impl Sync for DnsServerWatcherSynchronousProxy
impl Unpin for DnsServerWatcherSynchronousProxy
impl UnwindSafe for DnsServerWatcherSynchronousProxy
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