pub struct KeyserverManager<S> { /* private fields */ }
Expand description
KeyserverManager wraps a client and allows sampling and selecting of queries across a set of keyservers.
Implementations§
Source§impl<S> KeyserverManager<S>
impl<S> KeyserverManager<S>
Sourcepub fn from_service(service: S, uris: Vec<Uri>) -> Self
pub fn from_service(service: S, uris: Vec<Uri>) -> Self
Creates a new manager from URIs and a client.
Sourcepub fn into_client(self) -> KeyserverClient<S>
pub fn into_client(self) -> KeyserverClient<S>
Converts the manager into the underlying client.
Source§impl<S> KeyserverManager<S>
impl<S> KeyserverManager<S>
Sourcepub async fn uniform_sample_metadata(
&self,
address: &str,
sample_size: usize,
) -> Result<SampleResponse<MetadataPackage, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
pub async fn uniform_sample_metadata( &self, address: &str, sample_size: usize, ) -> Result<SampleResponse<MetadataPackage, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
Perform a uniform sample of metadata over keyservers and select the latest.
Sourcepub async fn collect_peers(
&self,
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
pub async fn collect_peers( &self, ) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
Collect all peers from keyservers.
Sourcepub async fn crawl_peers(
&self,
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
pub async fn crawl_peers( &self, ) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
Crawl peers.
Sourcepub async fn uniform_broadcast_metadata(
&self,
address: &str,
auth_wrapper: AuthWrapper,
token: String,
sample_size: usize,
) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
pub async fn uniform_broadcast_metadata( &self, address: &str, auth_wrapper: AuthWrapper, token: String, sample_size: usize, ) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
Perform a uniform broadcast of metadata over keyservers and select the latest.
Sourcepub async fn uniform_broadcast_raw_metadata(
&self,
address: &str,
raw_auth_wrapper: Vec<u8>,
token: String,
sample_size: usize,
) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
pub async fn uniform_broadcast_raw_metadata( &self, address: &str, raw_auth_wrapper: Vec<u8>, token: String, sample_size: usize, ) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
Perform a uniform broadcast of raw metadata over keyservers and select the latest.
Trait Implementations§
Source§impl<S: Clone> Clone for KeyserverManager<S>
impl<S: Clone> Clone for KeyserverManager<S>
Source§fn clone(&self) -> KeyserverManager<S>
fn clone(&self) -> KeyserverManager<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<S> Freeze for KeyserverManager<S>where
S: Freeze,
impl<S> !RefUnwindSafe for KeyserverManager<S>
impl<S> Send for KeyserverManager<S>where
S: Send,
impl<S> Sync for KeyserverManager<S>where
S: Sync,
impl<S> Unpin for KeyserverManager<S>where
S: Unpin,
impl<S> !UnwindSafe for KeyserverManager<S>
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