Trait parity_scale_codec::DecodeLimit [−][src]
pub trait DecodeLimit: Sized {
fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<Self, Error>;
fn decode_and_advance_with_depth_limit<I: Input>(
limit: u32,
input: &mut I
) -> Result<Self, Error>;
fn decode_all_with_depth_limit(
limit: u32,
input: &[u8]
) -> Result<Self, Error>;
}
Expand description
Extension trait to Decode
for decoding with a maximum recursion depth.
Required methods
Decode Self
with the given maximum recursion depth.
If limit
is hit, an error is returned.
Decode Self
and advance input
by the number of bytes consumed.
If limit
is hit, an error is returned.