[−][src]Struct xaynet_sdk::client::Client
A client that communicates with the coordinator's API via HTTP(S).
Implementations
impl<C> Client<C> where
C: XaynetHttpClient,
[src]
C: XaynetHttpClient,
pub fn new(http_client: C, base_url: &str) -> Result<Self, InvalidBaseUrl>
[src]
Create a new client.
Args
client
is the HTTP client that will be used to perform the HTTP requests. Any HTTP client can be used, as long as it implements theXaynetHttpClient
trait.base_url
is the URL to the Xaynet coordinator
Errors
An error is returned if base_url
is not a valid URL
Trait Implementations
impl<C: Clone> Clone for Client<C>
[src]
impl<C: Debug> Debug for Client<C>
[src]
impl<C> XaynetClient for Client<C> where
C: XaynetHttpClient + Send,
[src]
C: XaynetHttpClient + Send,
type Error = ClientError
pub fn get_round_params<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<RoundParameters, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<RoundParameters, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_sums<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<SumDict>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<SumDict>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_seeds<'life0, 'async_trait>(
&'life0 mut self,
pk: PublicSigningKey
) -> Pin<Box<dyn Future<Output = Result<Option<UpdateSeedDict>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
pk: PublicSigningKey
) -> Pin<Box<dyn Future<Output = Result<Option<UpdateSeedDict>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_model<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Model>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Model>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn send_message<'life0, 'async_trait>(
&'life0 mut self,
msg: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
msg: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl<C> RefUnwindSafe for Client<C> where
C: RefUnwindSafe,
[src]
C: RefUnwindSafe,
impl<C> Send for Client<C> where
C: Send,
[src]
C: Send,
impl<C> Sync for Client<C> where
C: Sync,
[src]
C: Sync,
impl<C> Unpin for Client<C> where
C: Unpin,
[src]
C: Unpin,
impl<C> UnwindSafe for Client<C> where
C: UnwindSafe,
[src]
C: 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> 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>,