Struct cashweb::keyserver_client::KeyserverClient[][src]

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

KeyserverClient allows queries to specific keyservers.

Implementations

impl<S> KeyserverClient<S>[src]

pub fn from_service(service: S) -> KeyserverClient<S>[src]

Create a new client from a Service.

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

pub fn new() -> KeyserverClient<Client<HttpConnector<GaiResolver>, Body>>[src]

Create a new HTTP client.

impl KeyserverClient<Client<HttpsConnector<HttpConnector<GaiResolver>>, Body>>[src]

impl<S> KeyserverClient<S> where
    KeyserverClient<S>: Service<(Uri, GetPeers)>,
    KeyserverClient<S>: Sync,
    KeyserverClient<S>: Clone,
    KeyserverClient<S>: Send,
    KeyserverClient<S>: 'static,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error: Display,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error: Error,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Future: Send,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Future: Sync,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Future: 'static,
    <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Response == Peers
[src]

pub async fn get_peers(
    &'_ self,
    keyserver_url: &'_ str
) -> Result<Peers, KeyserverError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
[src]

Get Peers from a keyserver.

impl<S> KeyserverClient<S> where
    KeyserverClient<S>: Service<(Uri, GetMetadata)>,
    KeyserverClient<S>: Sync,
    KeyserverClient<S>: Clone,
    KeyserverClient<S>: Send,
    KeyserverClient<S>: 'static,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error: Display,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error: Error,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future: Send,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future: Sync,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future: 'static,
    <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Response == MetadataPackage
[src]

pub async fn get_metadata(
    &'_ self,
    keyserver_url: &'_ str,
    address: &'_ str
) -> Result<MetadataPackage, KeyserverError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
[src]

Get AddressMetadata from a server. The result is wrapped in MetadataPackage.

impl<S> KeyserverClient<S> where
    KeyserverClient<S>: Service<(Uri, PutMetadata)>,
    KeyserverClient<S>: Sync,
    KeyserverClient<S>: Clone,
    KeyserverClient<S>: Send,
    KeyserverClient<S>: 'static,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error: Display,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error: Error,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future: Send,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future: Sync,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future: 'static,
    <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Response == ()
[src]

pub async fn put_metadata(
    &'_ self,
    keyserver_url: &'_ str,
    address: &'_ str,
    auth_wrapper: AuthWrapper,
    token: String
) -> Result<(), KeyserverError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
[src]

Put AuthWrapper to a keyserver.

impl<S> KeyserverClient<S> where
    KeyserverClient<S>: Service<(Uri, PutRawAuthWrapper)>,
    KeyserverClient<S>: Sync,
    KeyserverClient<S>: Clone,
    KeyserverClient<S>: Send,
    KeyserverClient<S>: 'static,
    <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error: Error,
    <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future: Send,
    <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future: Sync,
    <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future: 'static,
    <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Response == ()
[src]

pub async fn put_raw_metadata(
    &'_ self,
    keyserver_url: &'_ str,
    address: &'_ str,
    raw_auth_wrapper: Vec<u8, Global>,
    token: String
) -> Result<(), KeyserverError<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>>
[src]

Put raw AuthWrapper to a keyserver.

Trait Implementations

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

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

impl Default for KeyserverClient<Client<HttpConnector<GaiResolver>, Body>>[src]

impl<S> Service<(Uri, GetMetadata)> for KeyserverClient<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
[src]

type Response = MetadataPackage

Responses given by the service.

type Error = GetMetadataError<<S as Service<Request<Body>>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>> + 'static + Send, Global>>

The future response value.

impl<S> Service<(Uri, GetPeers)> for KeyserverClient<S> where
    S: Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static,
    <S as Service<Request<Body>>>::Error: Debug,
    <S as Service<Request<Body>>>::Error: Display,
    <S as Service<Request<Body>>>::Future: Send
[src]

type Response = Peers

Responses given by the service.

type Error = GetPeersError<<S as Service<Request<Body>>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Response, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>> + 'static + Send, Global>>

The future response value.

impl<S> Service<(Uri, GetRawAuthWrapper)> for KeyserverClient<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
[src]

type Response = RawAuthWrapperPackage

Responses given by the service.

type Error = GetRawAuthWrapperError<<S as Service<Request<Body>>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Error>> + 'static + Send, Global>>

The future response value.

impl<S> Service<(Uri, PutMetadata)> for KeyserverClient<S> where
    S: Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static,
    <S as Service<Request<Body>>>::Error: Debug,
    <S as Service<Request<Body>>>::Error: Display,
    <S as Service<Request<Body>>>::Future: Send
[src]

type Response = ()

Responses given by the service.

type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>> + 'static + Send, Global>>

The future response value.

impl<S> Service<(Uri, PutRawAuthWrapper)> for KeyserverClient<S> where
    S: Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static,
    <S as Service<Request<Body>>>::Error: Debug,
    <S as Service<Request<Body>>>::Error: Display,
    <S as Service<Request<Body>>>::Future: Send
[src]

type Response = ()

Responses given by the service.

type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>> + 'static + Send, Global>>

The future response value.

impl<S, T> Service<SampleRequest<T>> for KeyserverClient<S> where
    T: Send + 'static + Clone,
    S: Send + Clone + 'static,
    KeyserverClient<S>: Service<(Uri, T)>,
    <KeyserverClient<S> as Service<(Uri, T)>>::Response: Send,
    <KeyserverClient<S> as Service<(Uri, T)>>::Response: Debug,
    <KeyserverClient<S> as Service<(Uri, T)>>::Error: Debug,
    <KeyserverClient<S> as Service<(Uri, T)>>::Error: Display,
    <KeyserverClient<S> as Service<(Uri, T)>>::Error: Send,
    <KeyserverClient<S> as Service<(Uri, T)>>::Future: Send
[src]

type Response = Vec<(Uri, Result<<KeyserverClient<S> as Service<(Uri, T)>>::Response, <KeyserverClient<S> as Service<(Uri, T)>>::Error>), Global>

Responses given by the service.

type Error = SampleError<<KeyserverClient<S> as Service<(Uri, T)>>::Error>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<SampleRequest<T>>>::Response, <KeyserverClient<S> as Service<SampleRequest<T>>>::Error>> + 'static + Send, Global>>

The future response value.

Auto Trait Implementations

impl<S> RefUnwindSafe for KeyserverClient<S> where
    S: RefUnwindSafe
[src]

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

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

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

impl<S> UnwindSafe for KeyserverClient<S> where
    S: UnwindSafe
[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, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized
[src]

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>,