pub struct LambdaRuntimeApiClient<ReqBody>(/* private fields */);
Expand description
An http client for the Lambda Runtime API.
Implementations§
source§impl<ReqBody: Body + Send + 'static> LambdaRuntimeApiClient<ReqBody>
impl<ReqBody: Body + Send + 'static> LambdaRuntimeApiClient<ReqBody>
Methods from Deref<Target = SendRequest<ReqBody>>§
sourcepub fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
pub fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
Polls to determine whether this sender can be used yet for a request.
If the associated connection is closed, this returns an Error.
sourcepub async fn ready(&mut self) -> Result<(), Error>
pub async fn ready(&mut self) -> Result<(), Error>
Waits until the dispatcher is ready
If the associated connection is closed, this returns an Error.
sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Checks if the connection is currently ready to send a request.
§Note
This is mostly a hint. Due to inherent latency of networks, it is possible that even after checking this is ready, sending a request may still fail because the connection was closed in the meantime.
sourcepub fn send_request(
&mut self,
req: Request<B>
) -> impl Future<Output = Result<Response<Incoming>, Error>>
pub fn send_request( &mut self, req: Request<B> ) -> impl Future<Output = Result<Response<Incoming>, Error>>
Sends a Request
on the associated connection.
Returns a future that if successful, yields the Response
.
§Note
There are some key differences in what automatic things the Client
does for you that will not be done here:
Client
requires absolute-formUri
s, since the scheme and authority are needed to connect. They aren’t required here.- Since the
Client
requires absolute-formUri
s, it can add theHost
header based on it. You must add aHost
header yourself before calling this method. - Since absolute-form
Uri
s are not required, if received, they will be serialized as-is.
Trait Implementations§
source§impl<ReqBody> Deref for LambdaRuntimeApiClient<ReqBody>
impl<ReqBody> Deref for LambdaRuntimeApiClient<ReqBody>
Auto Trait Implementations§
impl<ReqBody> Freeze for LambdaRuntimeApiClient<ReqBody>
impl<ReqBody> !RefUnwindSafe for LambdaRuntimeApiClient<ReqBody>
impl<ReqBody> Send for LambdaRuntimeApiClient<ReqBody>where
ReqBody: Send,
impl<ReqBody> Sync for LambdaRuntimeApiClient<ReqBody>where
ReqBody: Send,
impl<ReqBody> Unpin for LambdaRuntimeApiClient<ReqBody>
impl<ReqBody> !UnwindSafe for LambdaRuntimeApiClient<ReqBody>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more