Struct postcard::flavors::Slice [−][src]
pub struct Slice<'a> { /* fields omitted */ }Expand description
The Slice flavor is a storage flavor, storing the serialized (or otherwise modified) bytes into a plain
[u8] slice. The Slice flavor resolves into a sub-slice of the original slice buffer.
Implementations
Trait Implementations
The Output type is what this flavor “resolves” to when the serialization is complete.
For storage flavors, this is typically a concrete type. For modification flavors, this is
typically a generic parameter for the storage flavor they are wrapped around. Read more
The try_extend() trait method can be implemented when there is a more efficient way of processing multiple bytes at once, such as copying a slice to the output, rather than iterating over one byte at a time. Read more
The try_push() trait method can be used to push a single byte to be modified and/or stored
The release() trait method finalizes the modification or storage operation, and resolved into
the type defined by SerFlavor::Output associated type. Read more
The try_push_varint_usize() trait method can be used to push a VarintUsize. The default
implementation uses try_extend() to process the encoded VarintUsize bytes, which is likely
the desired behavior for most circumstances. Read more