pub enum QueryInfo {
Bootstrap {
peer: PeerId,
remaining: Option<IntoIter<Key<PeerId>>>,
},
GetClosestPeers {
key: Vec<u8>,
},
GetProviders {
key: Key,
providers: HashSet<PeerId>,
},
AddProvider {
key: Key,
phase: AddProviderPhase,
context: AddProviderContext,
},
PutRecord {
record: Record,
quorum: NonZeroUsize,
phase: PutRecordPhase,
context: PutRecordContext,
},
GetRecord {
key: Key,
records: Vec<PeerRecord>,
quorum: NonZeroUsize,
cache_at: Option<Key<PeerId>>,
},
}Expand description
Information about a running query.
Variants§
Bootstrap
A query initiated by Kademlia::bootstrap.
Fields
GetClosestPeers
A query initiated by Kademlia::get_closest_peers.
GetProviders
A query initiated by Kademlia::get_providers.
Fields
AddProvider
A (repeated) query initiated by Kademlia::start_providing.
Fields
§
phase: AddProviderPhaseThe current phase of the query.
§
context: AddProviderContextThe execution context of the query.
PutRecord
A (repeated) query initiated by Kademlia::put_record.
Fields
§
quorum: NonZeroUsizeThe expected quorum of responses w.r.t. the replication factor.
§
phase: PutRecordPhaseThe current phase of the query.
§
context: PutRecordContextThe execution context of the query.
GetRecord
A query initiated by Kademlia::get_record.
Fields
§
records: Vec<PeerRecord>The records with the id of the peer that returned them. None when
the record was found in the local store.
§
quorum: NonZeroUsizeThe number of records to look for.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QueryInfo
impl RefUnwindSafe for QueryInfo
impl Send for QueryInfo
impl Sync for QueryInfo
impl Unpin for QueryInfo
impl UnwindSafe for QueryInfo
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> 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