parity_scale_codec

Trait DecodeAll

Source
pub trait DecodeAll: Sized {
    // Required method
    fn decode_all(input: &mut &[u8]) -> Result<Self, Error>;
}
Expand description

Extension trait to Decode that ensures that the given input data is consumed completely while decoding.

Required Methods§

Source

fn decode_all(input: &mut &[u8]) -> Result<Self, Error>

Decode Self and consume all of the given input data.

If not all data is consumed, an error is returned.

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.

Implementors§

Source§

impl<T: Decode> DecodeAll for T