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