Expand description
Wirevalue provides an erased serialization format. Any is a type-erased
envelope containing a serialized value identified by a typeuri::Named.
Wirevalues also provide encoding polymorphism, allowing the same representation
to carry multiple serialization formats, and to transcode between them for
types that are registered through register_type!.
Modules§
Macros§
- register_
type - Register a (concrete) type so that it may be looked up by name or hash. Type registration is required only to improve diagnostics, as it allows a binary to introspect serialized payloads under type erasure.
Structs§
- Any
- Represents a serialized value, wrapping the underlying serialization and deserialization details, while ensuring that we pass correctly-serialized message throughout the system.
- Encoding
Iter - An iterator over the variants of Encoding
- HexFmt
- Formats a binary slice as hex when its display function is called.
- JsonFmt
- Formats a JSON value for display, printing all keys but truncating and displaying a hash if the content is too long.
Enums§
- Encoding
- An enumeration containing the supported encodings of serialized values.
- Error
- The type of error returned by operations on
Any.
Constants§
- BROKEN_
TYPEHASH - Typehash value indicating a broken (unknown type, no value) Any.
Traits§
- Encoding
Marker - Marker trait for supported
Anyencoding type states. - Named
- A
Namedtype is a type that has a globally unique name. - Static
Encoding - Marker trait for statically known
Anyencodings.
Type Aliases§
- Result
- A specialized Result type for wirevalue operations.
Derive Macros§
- Named
- Derive the [
typeuri::Named] trait for a struct or enum.