[][src]Trait parity_scale_codec::DecodeLimit

pub trait DecodeLimit: Sized {
    fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<Self, Error>;
fn decode_all_with_depth_limit(
        limit: u32,
        input: &[u8]
    ) -> Result<Self, Error>; }

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

Required methods

fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<Self, Error>

Decode Self with given maximum recursion depth. is returned.

fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<Self, Error>

Decode Self and consume all of the given input data. If not all data is consumed, an error is returned.

Loading content...

Implementors

impl<T: Decode> DecodeLimit for T[src]

Loading content...