pub struct ServiceInstanceResolverSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ServiceInstanceResolverSynchronousProxy
impl ServiceInstanceResolverSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ServiceInstanceResolverEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ServiceInstanceResolverEvent, 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 resolve_service_instance(
&self,
service: &str,
instance: &str,
timeout: i64,
options: &ServiceInstanceResolutionOptions,
___deadline: MonotonicInstant,
) -> Result<ServiceInstance, Error>
pub fn resolve_service_instance( &self, service: &str, instance: &str, timeout: i64, options: &ServiceInstanceResolutionOptions, ___deadline: MonotonicInstant, ) -> Result<ServiceInstance, Error>
Resolves a specific service instance by sending an SRV query and returns the endpoints, target and text records.
- request
service
name of the type of service to be resolved. For example, cast uses ‘_googlecast._tcp.’. - request
instance
name of the instance to be resolved. This is often a descriptive name such asOffice Printer
or a name containing a large random number. - request
timeout
specifies how long the service should wait before giving up when waiting for a response to a resolution query. - request
options
options to be applied to the resolution.
A successful resolution will return target and at least one endpoint. Unsuccessful resolution occurs when either the service instance doesn’t respond or there is no endpoint (IP & port).
Trait Implementations§
Source§impl SynchronousProxy for ServiceInstanceResolverSynchronousProxy
impl SynchronousProxy for ServiceInstanceResolverSynchronousProxy
Source§type Proxy = ServiceInstanceResolverProxy
type Proxy = ServiceInstanceResolverProxy
The async proxy for the same protocol.
Source§type Protocol = ServiceInstanceResolverMarker
type Protocol = ServiceInstanceResolverMarker
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 ServiceInstanceResolverSynchronousProxy
impl RefUnwindSafe for ServiceInstanceResolverSynchronousProxy
impl Send for ServiceInstanceResolverSynchronousProxy
impl Sync for ServiceInstanceResolverSynchronousProxy
impl Unpin for ServiceInstanceResolverSynchronousProxy
impl UnwindSafe for ServiceInstanceResolverSynchronousProxy
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