pub struct LocalSwarmDiscovery { /* private fields */ }
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Available on crate feature
discovery-local-network
only.Expand description
Discovery using swarm-discovery
, a variation on mdns
Implementations§
Source§impl LocalSwarmDiscovery
impl LocalSwarmDiscovery
Sourcepub fn new(node_id: NodeId) -> Result<Self>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn new(node_id: NodeId) -> Result<Self>
Create a new LocalSwarmDiscovery
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 LocalSwarmDiscovery
impl Debug for LocalSwarmDiscovery
Source§impl Discovery for LocalSwarmDiscovery
impl Discovery for LocalSwarmDiscovery
Source§fn resolve(
&self,
_ep: Endpoint,
node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
fn resolve( &self, _ep: Endpoint, node_id: NodeId, ) -> Option<BoxStream<Result<DiscoveryItem>>>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Auto Trait Implementations§
impl Freeze for LocalSwarmDiscovery
impl !RefUnwindSafe for LocalSwarmDiscovery
impl Send for LocalSwarmDiscovery
impl Sync for LocalSwarmDiscovery
impl Unpin for LocalSwarmDiscovery
impl !UnwindSafe for LocalSwarmDiscovery
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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