pub struct BootstrapList(pub Vec<String>);Expand description
A list of bootstrap node multiaddrs loaded from disk.
Tuple Fields§
§0: Vec<String>Implementations§
Source§impl BootstrapList
impl BootstrapList
Sourcepub fn load(path: &Path) -> Self
pub fn load(path: &Path) -> Self
Load from path. Returns an empty list if the file is absent or
cannot be parsed (never fails hard).
Sourcepub fn apply(&self, swarm: &mut Swarm<BillPouchBehaviour>)
pub fn apply(&self, swarm: &mut Swarm<BillPouchBehaviour>)
Apply the list to swarm: parse each addr, add to Kademlia, and dial.
Entries that cannot be parsed or that lack a /p2p/<PeerId> component
are skipped with a warning log.
Trait Implementations§
Source§impl Debug for BootstrapList
impl Debug for BootstrapList
Source§impl Default for BootstrapList
impl Default for BootstrapList
Source§fn default() -> BootstrapList
fn default() -> BootstrapList
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BootstrapList
impl<'de> Deserialize<'de> for BootstrapList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BootstrapList
impl RefUnwindSafe for BootstrapList
impl Send for BootstrapList
impl Sync for BootstrapList
impl Unpin for BootstrapList
impl UnwindSafe for BootstrapList
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more