Struct conjure_runtime::Client
source · [−]pub struct Client<T = DefaultRawClient> { /* private fields */ }Expand description
An asynchronous HTTP client to a remote service.
It implements the Conjure AsyncClient trait, but also offers a “raw” request interface for use with services that
don’t provide Conjure service definitions.
Implementations
Trait Implementations
sourceimpl<T, B> AsyncClient 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>>,
impl<T, B> AsyncClient 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>>,
type BodyWriter = BodyWriter
type BodyWriter = BodyWriter
The client’s binary request body write type.
type ResponseBody = ResponseBody<B>
type ResponseBody = ResponseBody<B>
The client’s binary response body type.
sourcefn send<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<AsyncBody<'life1, Self::BodyWriter>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<AsyncBody<'life1, Self::BodyWriter>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Makes an HTTP request. Read more
sourceimpl<T> AsyncService<Client<T>> for Client<T>
impl<T> AsyncService<Client<T>> for Client<T>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more