pub struct BootstrapDiscovery { /* private fields */ }
Expand description
Well-known bootstrap nodes for the P2P Foundation network
Implementations§
Source§impl BootstrapDiscovery
impl BootstrapDiscovery
Sourcepub fn add_bootstrap(&mut self, addr: Multiaddr)
pub fn add_bootstrap(&mut self, addr: Multiaddr)
Add a custom bootstrap node
Sourcepub fn resolve_three_words(&self, three_words: &str) -> Result<Multiaddr>
pub fn resolve_three_words(&self, three_words: &str) -> Result<Multiaddr>
Resolve a three-word address to a multiaddr
Sourcepub fn get_bootstrap_addresses(&self) -> Vec<Multiaddr> ⓘ
pub fn get_bootstrap_addresses(&self) -> Vec<Multiaddr> ⓘ
Get all available bootstrap addresses
Sourcepub fn get_well_known_three_words(&self) -> Vec<String>
pub fn get_well_known_three_words(&self) -> Vec<String>
Get well-known three-word addresses
Sourcepub async fn discover_bootstraps(&self) -> Result<Vec<Multiaddr>>
pub async fn discover_bootstraps(&self) -> Result<Vec<Multiaddr>>
Discover bootstrap nodes using multiple methods
Sourcepub async fn test_bootstrap_connectivity(
&self,
) -> Result<Vec<(Multiaddr, bool)>>
pub async fn test_bootstrap_connectivity( &self, ) -> Result<Vec<(Multiaddr, bool)>>
Test connectivity to bootstrap nodes
Sourcepub fn update_hardcoded_bootstraps(
&mut self,
new_bootstraps: HashMap<String, Multiaddr>,
)
pub fn update_hardcoded_bootstraps( &mut self, new_bootstraps: HashMap<String, Multiaddr>, )
Update the hardcoded bootstrap list (for dynamic updates)
Trait Implementations§
Source§impl Clone for BootstrapDiscovery
impl Clone for BootstrapDiscovery
Source§fn clone(&self) -> BootstrapDiscovery
fn clone(&self) -> BootstrapDiscovery
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BootstrapDiscovery
impl Debug for BootstrapDiscovery
Auto Trait Implementations§
impl Freeze for BootstrapDiscovery
impl RefUnwindSafe for BootstrapDiscovery
impl Send for BootstrapDiscovery
impl Sync for BootstrapDiscovery
impl Unpin for BootstrapDiscovery
impl UnwindSafe for BootstrapDiscovery
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