pub struct DiscoveryClient { /* private fields */ }Expand description
Stateless discovery helper that wraps the protocol request/response models.
Implementations§
Source§impl DiscoveryClient
impl DiscoveryClient
Sourcepub fn new(options: DiscoveryClientOptions) -> Result<Self, DiscoveryError>
pub fn new(options: DiscoveryClientOptions) -> Result<Self, DiscoveryError>
Creates a client that will send discovery packets to remote_addr.
Sourcepub fn discover(
&self,
requested: &[String],
) -> Result<DiscoveryOutcome, DiscoveryError>
pub fn discover( &self, requested: &[String], ) -> Result<DiscoveryOutcome, DiscoveryError>
Sends a discovery payload with the requested capability names and waits for a reply.
Sourcepub fn discover_with_report(&self, requested: &[String]) -> DiscoveryResult
pub fn discover_with_report(&self, requested: &[String]) -> DiscoveryResult
Sends discovery and returns diagnostics for each attempted target.
Trait Implementations§
Source§impl Drop for DiscoveryClient
impl Drop for DiscoveryClient
Auto Trait Implementations§
impl Freeze for DiscoveryClient
impl RefUnwindSafe for DiscoveryClient
impl Send for DiscoveryClient
impl Sync for DiscoveryClient
impl Unpin for DiscoveryClient
impl UnsafeUnpin for DiscoveryClient
impl UnwindSafe for DiscoveryClient
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