pub struct HttpRpcProtocol<C> { /* private fields */ }Expand description
An HTTP protocol for RPC-style APIs that put everything in the body.
This protocol ignores HTTP binding traits and serializes the entire input
into the request body using the provided codec. Used by protocols like
awsJson1_0, awsJson1_1, and rpcv2Cbor.
§Type parameters
C— the payload codec (ex:JsonCodec,CborCodec)
Implementations§
Trait Implementations§
Source§impl<C> ClientProtocol for HttpRpcProtocol<C>
impl<C> ClientProtocol for HttpRpcProtocol<C>
Source§fn protocol_id(&self) -> &ShapeId
fn protocol_id(&self) -> &ShapeId
Returns the Smithy shape ID of this protocol. Read more
Source§fn serialize_request(
&self,
input: &dyn SerializableStruct,
input_schema: &Schema,
endpoint: &str,
_cfg: &ConfigBag,
) -> Result<Request, SerdeError>
fn serialize_request( &self, input: &dyn SerializableStruct, input_schema: &Schema, endpoint: &str, _cfg: &ConfigBag, ) -> Result<Request, SerdeError>
Serializes an operation input into an HTTP request. Read more
Source§fn deserialize_response<'a>(
&self,
response: &'a Response,
_output_schema: &Schema,
_cfg: &ConfigBag,
) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
fn deserialize_response<'a>( &self, response: &'a Response, _output_schema: &Schema, _cfg: &ConfigBag, ) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
Deserializes an HTTP response, returning a boxed
ShapeDeserializer
for the response body. Read moreSource§fn update_endpoint(
&self,
request: &mut Request,
endpoint: &Endpoint,
cfg: &ConfigBag,
) -> Result<(), SerdeError>
fn update_endpoint( &self, request: &mut Request, endpoint: &Endpoint, cfg: &ConfigBag, ) -> Result<(), SerdeError>
Updates a previously serialized request with a new endpoint. Read more
Auto Trait Implementations§
impl<C> Freeze for HttpRpcProtocol<C>where
C: Freeze,
impl<C> RefUnwindSafe for HttpRpcProtocol<C>where
C: RefUnwindSafe,
impl<C> Send for HttpRpcProtocol<C>where
C: Send,
impl<C> Sync for HttpRpcProtocol<C>where
C: Sync,
impl<C> Unpin for HttpRpcProtocol<C>where
C: Unpin,
impl<C> UnwindSafe for HttpRpcProtocol<C>where
C: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.