Trait SizeHint

Source
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§

Source

fn size_hint(data: &[u8], offset: usize) -> Result<usize, Error>

Source

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.

Implementations on Foreign Types§

Source§

impl SizeHint for Vec<FieldMarker>

Source§

fn size_hint(_data: &[u8], _offset: usize) -> Result<usize, Error>

Source§

fn size_hint_(&self, data: &[u8], offset: usize) -> Result<usize, Error>

Implementors§