Skip to main content

Module protocol

Module protocol 

Source
Expand description

Schema-driven ServerProtocol implementations and protocol registration.

ProtocolRegistry::BUILTIN documents the built-in claim priority order, how custom protocols fit into it, and its effect on ambiguous requests.

Each protocol frames modeled errors with its discriminator:

ProtocolDiscriminator
restJson1x-amzn-errortype header, shape name only; none in body
awsJson1.0__type body member, full namespace#Name, written last
awsJson1.1__type body member, shape name only, written last
rpcv2Cbor__type body member, full namespace#Name, written first
restXmlnone

@httpHeader-bound error members are split out of the body on the REST protocols.

Structs§

AwsJson1_0
Stateful schema-driven AWS JSON 1.0 protocol implementation. Defaults to skipping escape validation in discarded strings. Set customizationConfig.protocols for this protocol to {"validateSkippedValues":true} to validate escape syntax without decoding Unicode escapes. UTF-8, unescaped control characters, and structural syntax remain checked in either mode.
AwsJson1_1
Stateful schema-driven AWS JSON 1.1 protocol implementation. Defaults to skipping escape validation in discarded strings. Set customizationConfig.protocols for this protocol to {"validateSkippedValues":true} to validate escape syntax without decoding Unicode escapes. UTF-8, unescaped control characters, and structural syntax remain checked in either mode.
EventStreamFraming
The event-frame capability of a metadata-routed protocol, as plain data.
ProtocolBuildContext
Everything a protocol factory sees.
ProtocolRegistration
A single protocol’s entry in a ProtocolRegistry.
ProtocolRegistry
A const collection of ProtocolRegistrations.
RestJson1
Stateful schema-driven restJson1 protocol implementation. Defaults to skipping escape validation in discarded strings. Set customizationConfig.protocols for this protocol to {"validateSkippedValues":true} to validate escape syntax without decoding Unicode escapes. UTF-8, unescaped control characters, and structural syntax remain checked in either mode.
RestXml
Stateful schema-driven restXml protocol implementation.
RpcV2Cbor
Stateful schema-driven Smithy RPC v2 CBOR protocol implementation.
SharedServerProtocol
Shared, erased server protocol selected by routing.

Enums§

BodyDirective
Whether request deserialization needs the body to be collected.
ProtocolOrder
Places a protocol relative to another protocol, by shape ID, in a multi-protocol service’s claim order. Constraints resolve transitively over every registered protocol, so a constraint against a protocol the service does not serve still orders the ones it does.
RequestBodyCollectionError

Traits§

BodyRoutedProtocol
A ServerProtocol that reads the request body to select operations.
MetadataRoutedProtocol
A ServerProtocol that selects operations from request metadata alone.
ServerProtocol
Schema-driven serialization for one protocol, keyed on struct schemas.

Functions§

collect_request_body

Type Aliases§

ProtocolFactory
Builds a protocol from its registered configuration into the erased handle carrying its routing kind. Produced by ProtocolRegistration::metadata_routed and ProtocolRegistration::body_routed, never written by hand.