#[non_exhaustive]pub enum Bootstrap {
Live {
peers: Vec<NodeCandidate>,
store_warning: Option<String>,
},
Cached {
peers: Vec<NodeCandidate>,
registry_error: String,
oldest_identity_secs: u64,
},
}Expand description
Where a bootstrap peer set came from.
The provenance is returned rather than logged from here so the caller
decides how to surface “the registry is down and this list may be months
old” — exactly what a user must not miss. Callers log Self::warning and
then take Self::into_peers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Live
Read live from the on-chain registry.
Fields
peers: Vec<NodeCandidate>The peers the registry returned.
store_warning: Option<String>The first peer-store write error hit while refreshing identities or pruning, if any. The fetch itself never fails on this — the store is best-effort — but a persistent write failure degrades the next run’s fallback and selection, so it is surfaced here rather than swallowed.
Cached
The registry could not be read; these peers came from the peer store.
Fields
peers: Vec<NodeCandidate>The peers the peer store held.
Implementations§
Source§impl Bootstrap
impl Bootstrap
Sourcepub fn warning(&self) -> Option<String>
pub fn warning(&self) -> Option<String>
A degraded-bootstrap message for the caller to log at WARN, or None
when the bootstrap was wholly healthy. Carries no severity prefix — the
caller’s log level supplies it.
Sourcepub fn into_peers(self) -> Vec<NodeCandidate>
pub fn into_peers(self) -> Vec<NodeCandidate>
The resolved peer set, whatever its provenance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bootstrap
impl RefUnwindSafe for Bootstrap
impl Send for Bootstrap
impl Sync for Bootstrap
impl Unpin for Bootstrap
impl UnsafeUnpin for Bootstrap
impl UnwindSafe for Bootstrap
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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