pub trait EncodableSize: Encodable<SizeEncoder> {
// Required method
fn encoded_size(&self) -> Result<usize, Self::Error>;
}Expand description
An extension trait for types that can calculate the size of their encoded form.
This trait is implemented for all types that implement the Encodable trait for SizeEncoder.
See the SizeEncoder encoder for more information.