Skip to main content

HasEncodedLen

Trait HasEncodedLen 

Source
pub trait HasEncodedLen<T>: Codec<T> {
    // Required method
    fn encoded_len(&self, msg: &T) -> Result<usize, <Self as Codec<T>>::Error>;
}
Expand description

Codec extension trait for types that can also compute the length of the encoded data.

Required Methods§

Source

fn encoded_len(&self, msg: &T) -> Result<usize, <Self as Codec<T>>::Error>

Implementors§