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.
Auto Trait Implementations§
impl Freeze for DiscoveryClient
impl RefUnwindSafe for DiscoveryClient
impl Send for DiscoveryClient
impl Sync for DiscoveryClient
impl Unpin 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