Struct conjure_runtime::blocking::Client[][src]

pub struct Client<T = DefaultRawClient>(_);

A blocking HTTP client to a remote service.

It implements the Conjure Client trait, but also offers a “raw” request interface for use with services that don’t provide Conjure service definitions.

Implementations

impl Client[src]

pub fn builder() -> Builder[src]

Returns a new Builder for clients.

impl<T> Client<T>[src]

pub fn request(
    &self,
    method: Method,
    pattern: &'static str
) -> RequestBuilder<'_, T>
[src]

Returns a new request builder.

The pattern argument is a template for the request path. The param method on the builder is used to fill in the parameters in the pattern with dynamic values.

pub fn get(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]

Returns a new builder for a GET request.

pub fn post(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]

Returns a new builder for a POST request.

pub fn put(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]

Returns a new builder for a PUT request.

pub fn delete(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]

Returns a new builder for a DELETE request.

pub fn patch(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]

Returns a new builder for a PATCH request.

Trait Implementations

impl<T, B> Client for Client<T> where
    T: Service<Request<RawBody>, Response = Response<B>> + 'static + Sync + Send,
    T::Error: Into<Box<dyn Error + Sync + Send>>,
    T::Future: Send,
    B: Body<Data = Bytes> + 'static + Send,
    B::Error: Into<Box<dyn Error + Sync + Send>>, 
[src]

type BinaryWriter = BodyWriter

The client’s binary request body writer type.

type BinaryBody = ResponseBody<B>

The client’s binary response body type.

impl<T> Clone for Client<T>[src]

Auto Trait Implementations

impl<T = DefaultRawClient> !RefUnwindSafe for Client<T>

impl<T> Send for Client<T> where
    T: Send + Sync

impl<T> Sync for Client<T> where
    T: Send + Sync

impl<T> Unpin for Client<T>

impl<T = DefaultRawClient> !UnwindSafe for Client<T>

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