pub struct MdnsDiscovery { /* private fields */ }
Available on crate feature
discovery-local-network
only.Expand description
Discovery using swarm-discovery
, a variation on mdns
Implementations§
Source§impl MdnsDiscovery
impl MdnsDiscovery
Sourcepub fn new(node_id: NodeId) -> Result<Self>
pub fn new(node_id: NodeId) -> Result<Self>
Create a new MdnsDiscovery
Service.
This starts a [Discoverer
] that broadcasts your addresses and receives addresses from other nodes in your local network.
§Errors
Returns an error if the network does not allow ipv4 OR ipv6.
§Panics
This relies on [tokio::runtime::Handle::current
] and will panic if called outside of the context of a tokio runtime.
Trait Implementations§
Source§impl Debug for MdnsDiscovery
impl Debug for MdnsDiscovery
Auto Trait Implementations§
impl Freeze for MdnsDiscovery
impl RefUnwindSafe for MdnsDiscovery
impl Send for MdnsDiscovery
impl Sync for MdnsDiscovery
impl Unpin for MdnsDiscovery
impl UnwindSafe for MdnsDiscovery
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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