pub trait SizeHint {
// Required methods
fn size_hint(data: &[u8], offset: usize) -> Result<usize, Error>;
fn size_hint_(&self, data: &[u8], offset: usize) -> Result<usize, Error>;
}Expand description
Return the encoded byte size or a Decodable
Required Methods§
fn size_hint(data: &[u8], offset: usize) -> Result<usize, Error>
fn size_hint_(&self, data: &[u8], offset: usize) -> Result<usize, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.