Trait tetsy_scale_codec::DecodeLimit[][src]

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 for decoding with a maximum recursion depth.

Required methods

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

Decode Self with the given maximum recursion depth.

If limit is hit, an error is returned.

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

Decode Self and consume all of the given input data.

If not all data is consumed or limit is hit, an error is returned.

Loading content...

Implementors

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

Loading content...