Skip to main content

Module adapter

Module adapter 

Source
Expand description

Schema adapters that serialize a type by converting it to and from the value of an intermediate “wire” schema.

Structs§

DefaultOnEmptyRead
Deserializes using the wire schema T normally, but yields T::Dst::default() when the reader is exhausted (hits EOF) instead of erroring.
Discard
Reads a value with the Inner schema purely to advance the reader, then throws it away and yields Default::default() instead.
DiscardSeq
Discards a length-prefixed sequence: reads the length (encoded per Len) and steps over every element with the element schema T, advancing the reader exactly as decoding the sequence would, yet never allocates a backing buffer and always yields an empty Vec.
FromInto
Serialize a Target by going through an intermediate wire representation using the standard library From/Into conversions.