std::encoding::wire::value_traitCanonical opaque Value contract shared by the stdlib encoding modules.
The handle stays opaque by design: #1247 settled that callers should not
depend on any encoding's internal representation, only on a stable method
surface and the shared 0..6 type-tag prefix.
Shared tags:
0 = null1 = bool2 = i64/i643 = float/f644 = string5 = array6 = objectEncoding-specific variants, if any, start at 7+.
Note: TOML has no null type, so hew_toml_type never returns 0. The 0
slot is reserved in the shared prefix so that cross-encoding consumers can
use a uniform 0..6 tag range. Downstream TOML consumers should not add a
0 => arm expecting a real null โ it will never fire.
CanonicalValueMethodsCommon Value methods implemented by stdlib encodings with opaque handles.
Serialize the value back to its source encoding.
Return the canonical shared type tag.
Extract the boolean value (0 or 1).
Extract the integer value.
Extract the floating-point value.
Extract the string value.
Look up a field by key in an object-like value.
Return the number of elements in an array-like value.
Return the element at the given index in an array-like value.
Release the value resources.
Set a string field on an object-like value. Returns the object for chaining.
Set an integer field. Returns the object for chaining.
Set a float field. Returns the object for chaining.
Set a boolean field. Returns the object for chaining.
Set a child value on an object-like value. The child is consumed.
Push a child value onto an array-like value. The child is consumed.
Push an integer onto an array-like value.
Push a string onto an array-like value.
Push a float onto an array-like value.
Push a boolean onto an array-like value.