Skip to main content

Module native

Module native 

Source
Expand description

Explicit resource admission for native Serde payloads in the same Postcard format.

Types, IDs, deterministic serialization and domain rules are consumer-owned. This does not implement Wire for arbitrary types or infer a finite schema. Custom Serde implementations are trusted: allocations/work outside visited values cannot be constrained here. See the runtime guide for budget semantics.

Functionsยง

decode
Decode a complete canonical payload; allocation admission precedes visitor calls. Borrowed bytes and strings may refer directly to the input for its lifetime. Canonical verification and conservative resource charges also apply to borrowed values.
decode_request
Check request identity and direction before decoding its bounded native value.
decode_response
Check response identity and direction before decoding its bounded native value.
encode
Encode an owned or borrowed native payload under explicit traversal allowances.
encode_into
Encode into reusable caller storage. Previous contents are cleared, including on error. Capacity may be lost on serialization failure; successful calls retain it. Retain a separate immutable frame when bytes must survive subsequent calls for retries.
encode_request
Encode a complete request; limits.bytes includes the canonical frame header.
encode_request_into
Encode a request into reusable storage; follows encode_into failure semantics.
encode_response
Encode a complete response, including borrowed response projections.
encode_response_into
Encode a response into reusable storage; follows encode_into failure semantics.
encoded_frame_len
Measure a request or response frame; both directions have equal header length.
encoded_len
Measure one native payload with no output allocation; bytes excludes a frame.