Struct cashweb::keyserver_client::KeyserverManager[][src]

pub struct KeyserverManager<S> { /* fields omitted */ }

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, Global>) -> KeyserverManager<S>[src]

Creates a new manager from URIs and a client.

pub fn get_uris(&self) -> Arc<RwLock<Vec<Uri, Global>>>[src]

Get shared reference the Uris.

pub fn into_client(self) -> KeyserverClient<S>[src]

Converts the manager into the underlying client.

impl KeyserverManager<Client<HttpConnector<GaiResolver>, Body>>[src]

pub fn new(
    uris: Vec<String, Global>
) -> Result<KeyserverManager<Client<HttpConnector<GaiResolver>, Body>>, InvalidUri>
[src]

Create a HTTP manager.

impl<S> KeyserverManager<S> where
    S: Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static,
    <S as Service<Request<Body>>>::Future: Send,
    <S as Service<Request<Body>>>::Error: Debug,
    <S as Service<Request<Body>>>::Error: Display,
    <S as Service<Request<Body>>>::Error: Send
[src]

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]

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]

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]

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]

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, Global>,
    token: String,
    sample_size: usize
) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
[src]

Perform a uniform broadcast of raw metadata over keyservers and select the latest.

Trait Implementations

impl<S> Clone for KeyserverManager<S> where
    S: Clone
[src]

impl<S> Debug for KeyserverManager<S> where
    S: Debug
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for KeyserverManager<S>[src]

impl<S> Send for KeyserverManager<S> where
    S: Send
[src]

impl<S> Sync for KeyserverManager<S> where
    S: Sync
[src]

impl<S> Unpin for KeyserverManager<S> where
    S: Unpin
[src]

impl<S> !UnwindSafe for KeyserverManager<S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,