Expand description
Bounded Serde/Postcard contracts with optional schema generation.
Bounded encoding and decoding, method identity and request-header admission. Header admission is neither authentication nor payload/schema/resource validation.
Modules§
- serde_
packed - Explicit bulk field adapters within the single Serde/Postcard codec.
Structs§
- Byte
Array - Published Serde bulk byte types; ByteArray includes a length prefix, unlike
an ordinary
[u8; N]. Changing field representation requires consumer review. Wrapper around[u8; N]to serialize and deserialize efficiently. - ByteBuf
- Published Serde bulk byte types; ByteArray includes a length prefix, unlike
an ordinary
[u8; N]. Changing field representation requires consumer review. Wrapper aroundVec<u8>to serialize and deserialize efficiently. - Bytes
- Bounded opaque bytes; consumers validate principal bytes using their existing principal type. IC Wire defines no new identity type.
- Bytes
Ref - Opaque bytes bounded in length, borrowing their backing storage. Decoding accepts borrowed input only; the value cannot outlive that input.
- Finite
F32 - Finite IEEE-754 value. Preserves signed zero and subnormal bits.
- Finite
F64 - Finite IEEE-754 value. Preserves signed zero and subnormal bits.
- Limits
- Consumer-selected Serde traversal allowances.
- List
- A sequence with a compile-time element bound.
- Packed
- Explicit fixed-width little-endian byte buffer. Prefix counts bytes, not elements. Ordinary vectors retain their original Serde representation. N limits the number of words; the default is unbounded apart from codec limits.
- Text
- UTF-8 text bounded in bytes.
- TextRef
- UTF-8 text bounded in bytes, borrowing its backing storage. Decoding accepts borrowed input only, without an owned fallback.
Enums§
- Direction
- Direction carried by the last header byte.
- Encoding
- Interpretation of the input byte span.
- Error
- Wire failure categories, independent of transport and application errors.
Traits§
- Packed
Element - Qualified fixed-width packed words. Sealed; arbitrary-bit casts never admit booleans, nonzero integers or floating-point domain values.
Functions§
- decode
- Decode exactly one payload or frame under explicit traversal allowances.
- encode
- Encode into owned storage after a complete sizing/admission pass.
- encode_
into - Encode into reusable storage, returning only the completed prefix.
- encode_
to_ slice - Encode into caller storage without allocating codec output.
- encoded_
len - Measure the complete selected encoding without allocating codec output.
- method_
id - Derive a routing ID from the exact exported method name.
- validate_
request_ header - Admit an exact 11-byte request header before copying its payload.