pub trait ResolveHandle {
type Error: Debug + Send;
// Provided methods
fn resolve_random(
&mut self,
id: impl Into<Id>,
) -> impl Future<Output = Result<Option<PeerId>, Self::Error>> { ... }
fn resolve_first(
&mut self,
id: impl Into<Id>,
) -> impl Future<Output = Result<Option<PeerId>, Self::Error>> { ... }
fn resolve_all(
&mut self,
id: impl Into<Id>,
) -> impl Stream<Item = Result<PeerId, Self::Error>> + Send { ... }
fn resolve_handle(
&mut self,
_handle: impl Into<Handle>,
) -> impl Stream<Item = Result<PeerId, Self::Error>> + Send { ... }
}Expand description
A resolver for ASIMOV handles (e.g., “Ⓐjhacker”).
Required Associated Types§
Provided Methods§
Sourcefn resolve_random(
&mut self,
id: impl Into<Id>,
) -> impl Future<Output = Result<Option<PeerId>, Self::Error>>
fn resolve_random( &mut self, id: impl Into<Id>, ) -> impl Future<Output = Result<Option<PeerId>, Self::Error>>
Resolves an ASIMOV ID and yields a random known peer ID. Ignores any erroneous results, sampling from only successful results.
The default implementation requires the random feature.
Sourcefn resolve_first(
&mut self,
id: impl Into<Id>,
) -> impl Future<Output = Result<Option<PeerId>, Self::Error>>
fn resolve_first( &mut self, id: impl Into<Id>, ) -> impl Future<Output = Result<Option<PeerId>, Self::Error>>
Resolves an ASIMOV ID and yields only the first known peer ID. Ignores any initial erroneous results, returning the first successful result.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl ResolveHandle for CsvHandleResolver
Available on crate features csv and std only.
impl ResolveHandle for CsvHandleResolver
Available on crate features
csv and std only.