pub trait TargetedResolver: Resolver {
type PublicKey: PublicKey;
// Required methods
fn fetch_targeted(
&mut self,
fetch: impl Into<Fetch<Self::Key, Self::Subscriber>> + Send,
targets: NonEmptyVec<Self::PublicKey>,
) -> Feedback;
fn fetch_all_targeted<F>(
&mut self,
keys: Vec<(F, NonEmptyVec<Self::PublicKey>)>,
) -> Feedback
where F: Into<Fetch<Self::Key, Self::Subscriber>> + Send;
}Expand description
Extension for resolvers that accept target peer hints.
Required Associated Types§
Required Methods§
Sourcefn fetch_targeted(
&mut self,
fetch: impl Into<Fetch<Self::Key, Self::Subscriber>> + Send,
targets: NonEmptyVec<Self::PublicKey>,
) -> Feedback
fn fetch_targeted( &mut self, fetch: impl Into<Fetch<Self::Key, Self::Subscriber>> + Send, targets: NonEmptyVec<Self::PublicKey>, ) -> Feedback
Initiate a fetch with target peer hints.
Implementations define whether target hints persist through retries, merge with existing in-progress fetches, or are discarded.
Sourcefn fetch_all_targeted<F>(
&mut self,
keys: Vec<(F, NonEmptyVec<Self::PublicKey>)>,
) -> Feedback
fn fetch_all_targeted<F>( &mut self, keys: Vec<(F, NonEmptyVec<Self::PublicKey>)>, ) -> Feedback
Initiate fetches for multiple keys, each with their own target hints.
See fetch_targeted for details on target behavior.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".