Struct yarapi::rest::WebClient[][src]

pub struct WebClient { /* fields omitted */ }

Convenient wrapper for the awc::Client with builder.

Implementations

impl WebClient[src]

pub fn builder() -> WebClientBuilder[src]

pub fn with_token(token: &str) -> WebClient[src]

pub fn request(&self, method: Method, url: &str) -> WebRequest<ClientRequest>[src]

pub async fn event_stream(
    &'_ self,
    url: &'_ str
) -> Result<impl Stream<Item = Result<Event, Error>>, Error>
[src]

pub fn get(&self, url: &str) -> WebRequest<ClientRequest>[src]

pub fn post(&self, url: &str) -> WebRequest<ClientRequest>[src]

pub fn put(&self, url: &str) -> WebRequest<ClientRequest>[src]

pub fn delete(&self, url: &str) -> WebRequest<ClientRequest>[src]

pub fn interface<T>(&self) -> Result<T, Error> where
    T: WebInterface
[src]

pub fn interface_at<T>(
    &self,
    base_url: impl Into<Option<Url>>
) -> Result<T, Error> where
    T: WebInterface
[src]

Trait Implementations

impl Clone for WebClient[src]

Auto Trait Implementations

impl !RefUnwindSafe for WebClient

impl !Send for WebClient

impl !Sync for WebClient

impl Unpin for WebClient

impl !UnwindSafe for WebClient

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> Same<T> for T

type Output = T

Should always be Self

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>,