[][src]Struct xaynet_sdk::client::Client

pub struct Client<C> { /* fields omitted */ }

A client that communicates with the coordinator's API via HTTP(S).

Implementations

impl<C> Client<C> where
    C: XaynetHttpClient
[src]

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 the XaynetHttpClient 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]

type Error = ClientError

Auto Trait Implementations

impl<C> RefUnwindSafe for Client<C> where
    C: RefUnwindSafe
[src]

impl<C> Send for Client<C> where
    C: Send
[src]

impl<C> Sync for Client<C> where
    C: Sync
[src]

impl<C> Unpin for Client<C> where
    C: Unpin
[src]

impl<C> UnwindSafe for Client<C> where
    C: 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> 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>,