[−][src]Struct cashweb_relay_client::RelayClient
RelayClient allows queries to specific relay servers.
Implementations
impl<S> RelayClient<S>
[src]
pub fn from_service(service: S) -> Self
[src]
Create a new client from a service.
impl RelayClient<HyperClient<HttpConnector>>
[src]
impl<S> RelayClient<S> where
Self: Service<(Uri, GetProfile), Response = ProfilePackage>,
Self: Sync + Clone + Send + 'static,
Self::Future: Send + Sync + 'static,
Self::Error: Debug + Display + Error,
[src]
Self: Service<(Uri, GetProfile), Response = ProfilePackage>,
Self: Sync + Clone + Send + 'static,
Self::Future: Send + Sync + 'static,
Self::Error: Debug + Display + Error,
pub async fn get_profile<'_, '_, '_>(
&'_ self,
keyserver_url: &'_ str,
address: &'_ str
) -> Result<ProfilePackage, RelayError<Self::Error>>
[src]
&'_ self,
keyserver_url: &'_ str,
address: &'_ str
) -> Result<ProfilePackage, RelayError<Self::Error>>
Get Profile
from a server. The result is wrapped in ProfilePackage
.
impl<S> RelayClient<S> where
Self: Service<(Uri, PutProfile), Response = ()>,
Self: Sync + Clone + Send + 'static,
Self::Future: Send + Sync + 'static,
Self::Error: Debug + Display + Error,
[src]
Self: Service<(Uri, PutProfile), Response = ()>,
Self: Sync + Clone + Send + 'static,
Self::Future: Send + Sync + 'static,
Self::Error: Debug + Display + Error,
pub async fn put_profile<'_, '_, '_>(
&'_ self,
relay_url: &'_ str,
address: &'_ str,
profile: Profile,
token: String
) -> Result<(), RelayError<Self::Error>>
[src]
&'_ self,
relay_url: &'_ str,
address: &'_ str,
profile: Profile,
token: String
) -> Result<(), RelayError<Self::Error>>
Put a Profile
to a relay server.
Trait Implementations
impl<S: Clone> Clone for RelayClient<S>
[src]
fn clone(&self) -> RelayClient<S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug> Debug for RelayClient<S>
[src]
impl Default for RelayClient<HyperClient<HttpConnector>>
[src]
impl<S> Service<(Uri, GetMessages)> for RelayClient<S> where
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
[src]
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
type Response = MessagePage
Responses given by the service.
type Error = GetMessageError<S::Error>
Errors produced by the service.
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'static>>
The future response value.
fn poll_ready(&mut self, context: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, (uri, request): (Uri, GetMessages)) -> Self::Future
[src]
impl<S> Service<(Uri, GetProfile)> for RelayClient<S> where
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
[src]
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
type Response = AuthWrapper
Responses given by the service.
type Error = GetProfileError<S::Error>
Errors produced by the service.
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'static>>
The future response value.
fn poll_ready(&mut self, context: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, (uri, _): (Uri, GetProfile)) -> Self::Future
[src]
impl<S> Service<(Uri, PutProfile)> for RelayClient<S> where
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
[src]
S: Service<Request<Body>, Response = Response<Body>>,
S: Send + Clone + 'static,
S::Future: Send,
S::Error: Debug + Display,
type Response = ()
Responses given by the service.
type Error = PutProfileError<S::Error>
Errors produced by the service.
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'static>>
The future response value.
fn poll_ready(&mut self, context: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, (uri, request): (Uri, PutProfile)) -> Self::Future
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for RelayClient<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for RelayClient<S> where
S: Send,
S: Send,
impl<S> Sync for RelayClient<S> where
S: Sync,
S: Sync,
impl<S> Unpin for RelayClient<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for RelayClient<S> where
S: UnwindSafe,
S: UnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
T: Service<Request> + ?Sized,
fn ready(&mut self) -> Ready<Self, Request>
[src]
fn ready_and(&mut self) -> ReadyAnd<Self, Request>
[src]
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
[src]
fn oneshot(self, req: Request) -> Oneshot<Self, Request>
[src]
fn call_all<S>(self, reqs: S) -> CallAll<Self, S> where
S: Stream<Item = Request>,
Self::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
[src]
S: Stream<Item = Request>,
Self::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
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>,