Struct conjure_runtime::blocking::Client [−][src]
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]
impl<T> Client<T>[src]
pub fn request(
&self,
method: Method,
pattern: &'static str
) -> RequestBuilder<'_, T>[src]
&self,
method: Method,
pattern: &'static str
) -> RequestBuilder<'_, T>
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]
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>>,
type BinaryWriter = BodyWriter
The client’s binary request body writer type.
type BinaryBody = ResponseBody<B>
The client’s binary response body type.
fn request<'a, R, U>(
&self,
method: Method,
path: &'static str,
path_params: PathParams,
query_params: QueryParams,
headers: HeaderMap<HeaderValue>,
body: R,
response_visitor: U
) -> Result<<U as VisitResponse<Self::BinaryBody>>::Output, Error> where
R: RequestBody<'a, Self::BinaryWriter>,
U: VisitResponse<Self::BinaryBody>, [src]
&self,
method: Method,
path: &'static str,
path_params: PathParams,
query_params: QueryParams,
headers: HeaderMap<HeaderValue>,
body: R,
response_visitor: U
) -> Result<<U as VisitResponse<Self::BinaryBody>>::Output, Error> where
R: RequestBody<'a, Self::BinaryWriter>,
U: VisitResponse<Self::BinaryBody>,
impl<T> Clone for Client<T>[src]
fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl<T = DefaultRawClient> !RefUnwindSafe for Client<T>
impl<T> Send for Client<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for Client<T> where
T: Send + Sync,
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]
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, 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>,