Expand description
Schema-driven event stream marshalling and unmarshalling.
Frames are built and read against the shapes’ runtime [Schema]s instead of generated
per-shape marshallers: member schemas carry the @eventHeader and @eventPayload traits,
and the payload travels through the codec of whichever protocol routing selected. Generated
code contributes only the pieces that need shape types — a DeserializableEventStream
dispatch per stream union and a SerializableEventError dispatch per error enum — and
aliases its *Marshaller/*Unmarshaller types to the generics here.
The event framing follows the AWS event stream contract:
- a data event carries
:message-type: eventand:event-type(the Smithy member name), - an in-band error carries
:message-type: exceptionand:exception-type, @eventHeadermembers become message headers, an@eventPayloadmember becomes the payload (raw bytes for blobs, UTF-8 for strings, codec-encoded otherwise). Without an explicit payload member, non-header members form a codec-encoded payload document,:content-typelabels the payload:application/octet-streamandtext/plainare fixed by the member’s shape, everything else is the selected protocol’s event stream media type.
Structs§
- Event
Frame - One received event stream frame together with the protocol capability that decodes it.
- Event
Frame Deserializer - Reads an event struct from a frame, guided by the struct’s schema.
- NoModeled
Event Error Marshaller - The error marshaller of a stream union with no modeled
@errormembers. - Schema
Event Error Marshaller - Marshals the modeled errors of a schema-mode event stream union into
exceptionframes. - Schema
Event Marshaller - Marshals the events of a schema-mode event stream union into frames.
- Schema
Event Unmarshaller - Unmarshals schema-mode event stream frames into a generated stream union.
Enums§
- Initial
Response Policy - Whether to emit an initial response before output events.
Traits§
- Deserializable
Event Stream - A schema-mode event stream union that can be read back from frames.
- Serializable
Event Error - Names the active variant of a generated event stream error enum.
Functions§
- apply_
initial_ request - Applies the
initial-requestframe, when the protocol carries one, to the operation input being built. - event_
stream_ response_ body - Builds the response body of an event stream output: the marshalled events, preceded by an
initial-responseframe wheninitial_responseisInitialResponsePolicy::Send.