pub struct PeerPool { /* private fields */ }Expand description
A reusable set of peers built from a single DHT lookup, suitable for fetching many chunks from overlapping close groups without paying the lookup cost per chunk.
Build via Client::build_peer_pool_for. Use via
Client::chunk_get_with_pool.
On live mainnet today, where find_closest_peers dominates
per-chunk download wall-clock (~70 s/lookup), a pool built once
and reused across a 32-chunk batch reduces total wall-clock by
~34% vs the per-chunk lookup baseline. The advantage grows with
batch size.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerPool
impl RefUnwindSafe for PeerPool
impl Send for PeerPool
impl Sync for PeerPool
impl Unpin for PeerPool
impl UnsafeUnpin for PeerPool
impl UnwindSafe for PeerPool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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