pub struct AwsQueryProtocol { /* private fields */ }Implementations§
Source§impl AwsQueryProtocol
impl AwsQueryProtocol
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an awsQuery protocol instance.
The Version= form parameter defaults to the Smithy service shape’s version from the
config bag; use Self::with_service_version to override it.
Sourcepub fn with_service_version(self, version: impl Into<String>) -> Self
pub fn with_service_version(self, version: impl Into<String>) -> Self
Overrides the Version= form parameter.
By default it comes from the [ServiceVersion] config-bag entry that generated clients
store regardless of which protocol they were generated for. That default exists because a
customer selecting awsQuery through Config::builder().protocol(..) has no way to know the
model’s version, and awsQuery requires the parameter on every request.
Trait Implementations§
Source§impl ClientProtocolInner for AwsQueryProtocol
impl ClientProtocolInner for AwsQueryProtocol
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 awsQuery request.
_endpoint is deliberately ignored: awsQuery fixes the request path at / (its
StaticHttpBindingResolver uses @http(method: "POST", uri: "/")), so the route is a
function of the protocol rather than of the operation, and a path computed by codegen for a
different protocol must not leak through when this protocol is selected at runtime via
Config::builder().protocol(..). apply_http_endpoint merges the scheme and authority
afterwards.
Source§fn protocol_id(&self) -> &ShapeId<'static>
fn protocol_id(&self) -> &ShapeId<'static>
Source§fn deserialize_response<'a>(
&self,
response: &'a Response,
_output_schema: &Schema<'_>,
_cfg: &'a ConfigBag,
) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
fn deserialize_response<'a>( &self, response: &'a Response, _output_schema: &Schema<'_>, _cfg: &'a ConfigBag, ) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
ShapeDeserializer] that supplies
every member of output_schema this protocol carries in the response. 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>
§fn parse_error_metadata(
&self,
response: &Self::Response,
cfg: &ConfigBag,
) -> Result<Builder, SerdeError>
fn parse_error_metadata( &self, response: &Self::Response, cfg: &ConfigBag, ) -> Result<Builder, SerdeError>
§fn deserialize_error_response<'a>(
&self,
response: &'a Self::Response,
cfg: &'a ConfigBag,
) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
fn deserialize_error_response<'a>( &self, response: &'a Self::Response, cfg: &'a ConfigBag, ) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
ShapeDeserializer] positioned at the body of an error
response — inside the protocol’s error envelope, where applicable. Read more§fn payload_codec(&self) -> Option<&dyn DynCodec>
fn payload_codec(&self) -> Option<&dyn DynCodec>
§fn event_stream_media_type(&self) -> Option<&str>
fn event_stream_media_type(&self) -> Option<&str>
application/cbor or
application/json. Read more§fn parse_event_stream_error_metadata(
&self,
payload: &[u8],
) -> Result<Builder, SerdeError>
fn parse_event_stream_error_metadata( &self, payload: &[u8], ) -> Result<Builder, SerdeError>
exception frame. Read moreSource§impl Debug for AwsQueryProtocol
impl Debug for AwsQueryProtocol
Auto Trait Implementations§
impl Freeze for AwsQueryProtocol
impl RefUnwindSafe for AwsQueryProtocol
impl Send for AwsQueryProtocol
impl Sync for AwsQueryProtocol
impl Unpin for AwsQueryProtocol
impl UnsafeUnpin for AwsQueryProtocol
impl UnwindSafe for AwsQueryProtocol
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
§impl<P> ClientProtocol<<P as ClientProtocolInner>::Request, <P as ClientProtocolInner>::Response> for Pwhere
P: ClientProtocolInner,
impl<P> ClientProtocol<<P as ClientProtocolInner>::Request, <P as ClientProtocolInner>::Response> for Pwhere
P: ClientProtocolInner,
§fn protocol_id(&self) -> &ShapeId<'static>
fn protocol_id(&self) -> &ShapeId<'static>
§fn serialize_request(
&self,
input: &dyn SerializableStruct,
input_schema: &Schema<'_>,
endpoint: &str,
cfg: &ConfigBag,
) -> Result<<P as ClientProtocolInner>::Request, SerdeError>
fn serialize_request( &self, input: &dyn SerializableStruct, input_schema: &Schema<'_>, endpoint: &str, cfg: &ConfigBag, ) -> Result<<P as ClientProtocolInner>::Request, SerdeError>
§fn deserialize_response<'a>(
&self,
response: &'a <P as ClientProtocolInner>::Response,
output_schema: &Schema<'_>,
cfg: &'a ConfigBag,
) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
fn deserialize_response<'a>( &self, response: &'a <P as ClientProtocolInner>::Response, output_schema: &Schema<'_>, cfg: &'a ConfigBag, ) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
ShapeDeserializer].§fn parse_error_metadata(
&self,
response: &<P as ClientProtocolInner>::Response,
cfg: &ConfigBag,
) -> Result<Builder, SerdeError>
fn parse_error_metadata( &self, response: &<P as ClientProtocolInner>::Response, cfg: &ConfigBag, ) -> Result<Builder, SerdeError>
§fn deserialize_error_response<'a>(
&self,
response: &'a <P as ClientProtocolInner>::Response,
cfg: &'a ConfigBag,
) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
fn deserialize_error_response<'a>( &self, response: &'a <P as ClientProtocolInner>::Response, cfg: &'a ConfigBag, ) -> Result<Box<dyn ShapeDeserializer + 'a>, SerdeError>
ShapeDeserializer] positioned at the body of an error
response — inside the protocol’s error envelope, where applicable. Read more§fn update_endpoint(
&self,
request: &mut <P as ClientProtocolInner>::Request,
endpoint: &Endpoint,
cfg: &ConfigBag,
) -> Result<(), SerdeError>
fn update_endpoint( &self, request: &mut <P as ClientProtocolInner>::Request, endpoint: &Endpoint, cfg: &ConfigBag, ) -> Result<(), SerdeError>
§fn payload_codec(&self) -> Option<&dyn DynCodec>
fn payload_codec(&self) -> Option<&dyn DynCodec>
§fn event_stream_media_type(&self) -> Option<&str>
fn event_stream_media_type(&self) -> Option<&str>
§fn parse_event_stream_error_metadata(
&self,
payload: &[u8],
) -> Result<Builder, SerdeError>
fn parse_event_stream_error_metadata( &self, payload: &[u8], ) -> Result<Builder, SerdeError>
exception frame’s
payload. 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>
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>
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 more