Serialization into pre-allocated buffers.
fn serialized_len(&self, tag: Tag) -> usize
Computes the maximal length of the serialized representation.
If serialization would fail, this function underestimates the length.
Serializes into the given buffer.
Returns the length of the serialized representation.
If the length of the given slice is smaller than the maximal
length computed by
serialized_len(), this function returns