Struct cashweb_keyserver_client::KeyserverManager [−][src]
KeyserverManager wraps a client and allows sampling and selecting of queries across a set of keyservers.
Implementations
impl<S> KeyserverManager<S>
[src]
pub fn from_service(service: S, uris: Vec<Uri>) -> Self
[src]
Creates a new manager from URIs and a client.
pub fn get_uris(&self) -> Arc<RwLock<Vec<Uri>>>
[src]
Get shared reference the Uri
s.
pub fn into_client(self) -> KeyserverClient<S>
[src]
Converts the manager into the underlying client.
impl KeyserverManager<HyperClient<HttpConnector>>
[src]
impl<S> KeyserverManager<S> where
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display + Send,
[src]
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display + Send,
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>>
[src]
&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.
pub async fn collect_peers(
&self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
[src]
&self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
Collect all peers from keyservers.
pub async fn crawl_peers(
&self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
[src]
&self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
Crawl peers.
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>>
[src]
&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.
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>>
[src]
&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
impl<S: Clone> Clone for KeyserverManager<S>
[src]
fn clone(&self) -> KeyserverManager<S>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug> Debug for KeyserverManager<S>
[src]
Auto Trait Implementations
impl<S> !RefUnwindSafe for KeyserverManager<S>
[src]
impl<S> Send for KeyserverManager<S> where
S: Send,
[src]
S: Send,
impl<S> Sync for KeyserverManager<S> where
S: Sync,
[src]
S: Sync,
impl<S> Unpin for KeyserverManager<S> where
S: Unpin,
[src]
S: Unpin,
impl<S> !UnwindSafe for KeyserverManager<S>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,