pub struct KeyserverClient<S> { /* private fields */ }
Expand description
KeyserverClient
allows queries to specific keyservers.
Implementations§
Source§impl<S> KeyserverClient<S>
impl<S> KeyserverClient<S>
Sourcepub fn from_service(service: S) -> KeyserverClient<S>
pub fn from_service(service: S) -> KeyserverClient<S>
Create a new client from a Service
.
Source§impl KeyserverClient<Client<HttpConnector>>
impl KeyserverClient<Client<HttpConnector>>
Sourcepub fn new() -> KeyserverClient<Client<HttpConnector>>
pub fn new() -> KeyserverClient<Client<HttpConnector>>
Create a new HTTP client.
Source§impl KeyserverClient<Client<HttpsConnector<HttpConnector>>>
impl KeyserverClient<Client<HttpsConnector<HttpConnector>>>
Sourcepub fn new_tls() -> KeyserverClient<Client<HttpsConnector<HttpConnector>>>
pub fn new_tls() -> KeyserverClient<Client<HttpsConnector<HttpConnector>>>
Create new HTTPS client.
Source§impl<S> KeyserverClient<S>
impl<S> KeyserverClient<S>
Source§impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, GetMetadata), Response = MetadataPackage> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error: Display + Error,
<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future: Send + Sync + 'static,
impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, GetMetadata), Response = MetadataPackage> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error: Display + Error,
<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future: Send + Sync + 'static,
Sourcepub async fn get_metadata(
&self,
keyserver_url: &str,
address: &str,
) -> Result<MetadataPackage, KeyserverError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
pub async fn get_metadata( &self, keyserver_url: &str, address: &str, ) -> Result<MetadataPackage, KeyserverError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
Get AddressMetadata
from a server. The result is wrapped in MetadataPackage
.
Source§impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, PutMetadata), Response = ()> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error: Display + Error,
<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future: Send + Sync + 'static,
impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, PutMetadata), Response = ()> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error: Display + Error,
<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future: Send + Sync + 'static,
Sourcepub async fn put_metadata(
&self,
keyserver_url: &str,
address: &str,
auth_wrapper: AuthWrapper,
token: String,
) -> Result<(), KeyserverError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
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>>
Put AuthWrapper
to a keyserver.
Source§impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, PutRawAuthWrapper), Response = ()> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error: Error,
<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future: Send + Sync + 'static,
impl<S> KeyserverClient<S>where
KeyserverClient<S>: Service<(Uri, PutRawAuthWrapper), Response = ()> + Sync + Clone + Send + 'static,
<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error: Error,
<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future: Send + Sync + 'static,
Sourcepub async fn put_raw_metadata(
&self,
keyserver_url: &str,
address: &str,
raw_auth_wrapper: Vec<u8>,
token: String,
) -> Result<(), KeyserverError<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>>
pub async fn put_raw_metadata( &self, keyserver_url: &str, address: &str, raw_auth_wrapper: Vec<u8>, token: String, ) -> Result<(), KeyserverError<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>>
Put raw AuthWrapper
to a keyserver.
Trait Implementations§
Source§impl<S> Clone for KeyserverClient<S>where
S: Clone,
impl<S> Clone for KeyserverClient<S>where
S: Clone,
Source§fn clone(&self) -> KeyserverClient<S>
fn clone(&self) -> KeyserverClient<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 moreSource§impl<S> Debug for KeyserverClient<S>where
S: Debug,
impl<S> Debug for KeyserverClient<S>where
S: Debug,
Source§impl Default for KeyserverClient<Client<HttpConnector>>
impl Default for KeyserverClient<Client<HttpConnector>>
Source§fn default() -> KeyserverClient<Client<HttpConnector>>
fn default() -> KeyserverClient<Client<HttpConnector>>
Returns the “default value” for a type. Read more
Source§impl<S> Service<(Uri, GetMetadata)> for KeyserverClient<S>
impl<S> Service<(Uri, GetMetadata)> for KeyserverClient<S>
Source§type Response = MetadataPackage
type Response = MetadataPackage
Responses given by the service.
Source§type Error = GetMetadataError<<S as Service<Request<Body>>>::Error>
type Error = GetMetadataError<<S as Service<Request<Body>>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(
&mut self,
context: &mut Context<'_>,
) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
fn poll_ready( &mut self, context: &mut Context<'_>, ) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_: (Uri, GetMetadata),
) -> <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future
fn call( &mut self, _: (Uri, GetMetadata), ) -> <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<S> Service<(Uri, GetPeers)> for KeyserverClient<S>
impl<S> Service<(Uri, GetPeers)> for KeyserverClient<S>
Source§type Error = GetPeersError<<S as Service<Request<Body>>>::Error>
type Error = GetPeersError<<S as Service<Request<Body>>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Response, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Response, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>> + Send>>
The future response value.
Source§impl<S> Service<(Uri, GetRawAuthWrapper)> for KeyserverClient<S>
impl<S> Service<(Uri, GetRawAuthWrapper)> for KeyserverClient<S>
Source§type Response = RawAuthWrapperPackage
type Response = RawAuthWrapperPackage
Responses given by the service.
Source§type Error = GetRawAuthWrapperError<<S as Service<Request<Body>>>::Error>
type Error = GetRawAuthWrapperError<<S as Service<Request<Body>>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(
&mut self,
context: &mut Context<'_>,
) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Error>>
fn poll_ready( &mut self, context: &mut Context<'_>, ) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_: (Uri, GetRawAuthWrapper),
) -> <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Future
fn call( &mut self, _: (Uri, GetRawAuthWrapper), ) -> <KeyserverClient<S> as Service<(Uri, GetRawAuthWrapper)>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<S> Service<(Uri, PutMetadata)> for KeyserverClient<S>
impl<S> Service<(Uri, PutMetadata)> for KeyserverClient<S>
Source§type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>
type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Response, <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(
&mut self,
context: &mut Context<'_>,
) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
fn poll_ready( &mut self, context: &mut Context<'_>, ) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_: (Uri, PutMetadata),
) -> <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future
fn call( &mut self, _: (Uri, PutMetadata), ) -> <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<S> Service<(Uri, PutRawAuthWrapper)> for KeyserverClient<S>
impl<S> Service<(Uri, PutRawAuthWrapper)> for KeyserverClient<S>
Source§type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>
type Error = PutMetadataError<<S as Service<Request<Body>>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Response, <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(
&mut self,
context: &mut Context<'_>,
) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>>
fn poll_ready( &mut self, context: &mut Context<'_>, ) -> Poll<Result<(), <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_: (Uri, PutRawAuthWrapper),
) -> <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future
fn call( &mut self, _: (Uri, PutRawAuthWrapper), ) -> <KeyserverClient<S> as Service<(Uri, PutRawAuthWrapper)>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<S, T> Service<SampleRequest<T>> for KeyserverClient<S>
impl<S, T> Service<SampleRequest<T>> for KeyserverClient<S>
Source§type Response = Vec<(Uri, Result<<KeyserverClient<S> as Service<(Uri, T)>>::Response, <KeyserverClient<S> as Service<(Uri, T)>>::Error>)>
type Response = Vec<(Uri, Result<<KeyserverClient<S> as Service<(Uri, T)>>::Response, <KeyserverClient<S> as Service<(Uri, T)>>::Error>)>
Responses given by the service.
Source§type Error = SampleError<<KeyserverClient<S> as Service<(Uri, T)>>::Error>
type Error = SampleError<<KeyserverClient<S> as Service<(Uri, T)>>::Error>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<SampleRequest<T>>>::Response, <KeyserverClient<S> as Service<SampleRequest<T>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<KeyserverClient<S> as Service<SampleRequest<T>>>::Response, <KeyserverClient<S> as Service<SampleRequest<T>>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(
&mut self,
context: &mut Context<'_>,
) -> Poll<Result<(), <KeyserverClient<S> as Service<SampleRequest<T>>>::Error>>
fn poll_ready( &mut self, context: &mut Context<'_>, ) -> Poll<Result<(), <KeyserverClient<S> as Service<SampleRequest<T>>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_: SampleRequest<T>,
) -> <KeyserverClient<S> as Service<SampleRequest<T>>>::Future
fn call( &mut self, _: SampleRequest<T>, ) -> <KeyserverClient<S> as Service<SampleRequest<T>>>::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<S> Freeze for KeyserverClient<S>where
S: Freeze,
impl<S> RefUnwindSafe for KeyserverClient<S>where
S: RefUnwindSafe,
impl<S> Send for KeyserverClient<S>where
S: Send,
impl<S> Sync for KeyserverClient<S>where
S: Sync,
impl<S> Unpin for KeyserverClient<S>where
S: Unpin,
impl<S> UnwindSafe for KeyserverClient<S>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, Request> ServiceExt<Request> for T
impl<T, Request> ServiceExt<Request> for T
Source§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
👎Deprecated since 0.3.1: prefer
ready_and
which yields the serviceResolves when the service is ready to accept a request.
Source§fn ready_and(&mut self) -> ReadyAnd<'_, Self, Request>where
Self: Sized,
fn ready_and(&mut self) -> ReadyAnd<'_, Self, Request>where
Self: Sized,
Yields a mutable reference to the service when it is ready to accept a request.
Source§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
Yields the service when it is ready to accept a request.