Skip to main content

Module evolution

Module evolution 

Source
Expand description

Sparse extensions, open variants, and explicit message projections. Sparse extension fields, open variants and bounded message projections.

The sparse Wire projection stages and projects typed extension records and tuples through supported containers. Applications can also project open cases and recovery envelopes explicitly. Projected calls share Wire’s admission across the complete Serde value and typed envelope contents.

Structs§

ExtensionSlot
The final extension block of an evolvable record, with the associated set of field IDs retained in the Rust type.
Extensions
An opaque ordered collection of extension fields, represented as Postcard bytes.
ExtensionsWriter
Write sorted extension IDs into caller-owned scratch storage.
Field
A bounded field or variant payload borrowed from an admitted envelope.
Method
Bind an export name, direction limits and Rust DTOs to Wire frames.
OpaqueOpen
An optional open variant with a stable numeric ID and opaque payload.
OpenSlot
An open variant carrying the declaration of the cases the reader knows. Set REQUIRED to propagate unknown tags to the nearest recovering scope.
Projected
A manually projected message with a positional core and a sparse root block.
ProjectedOutput
The caller’s destination for one projected Serde write.
ReadContext
Admission context for one projection. It borrows the outer decode’s meter.
RecoverSlot
An optional, length-bounded payload that can recover an unknown required case.
Recoverable
A Postcard option containing a bounded, borrowed Postcard payload.
RecoveryContext
Projection scope that records unknown required tags and missing required fields.
WriteContext
Admission context for envelope preparation on the outer encoder’s meter.

Traits§

Evolving
A value with typed encoding and projection through the evolutionary codec.

Functions§

decode
Admit and decode one complete Wire message with its typed projection.
decode_projected
Decode the outer Serde DTO and project its envelopes under one budget.
encode
Encode a complete Wire message into owned output.
encode_into
Encode a complete Wire message into reusable output.
encode_projected_into
Prepare envelopes in caller-owned scratch space and encode the resulting DTO.
encode_projected_to_slice
Prepare envelopes and encode the DTO once into caller-owned output.
encode_projected_to_slice_with
Encode a DTO that borrows its projection context into caller-owned output.
encode_to_slice
Encode a derived Wire message directly into caller-owned output.
encoded_len
Measure a derived message using its sparse projection and shared budget.
projected_len
Measure an already projected message, including its root block and any frame header. Preparation of the projected fields uses the caller’s staging allowance.

Derive Macros§

Evolve
Generate typed preparation, projection and schema for stable evolution IDs.