alloy_rlp

Function decode_exact

source
pub fn decode_exact<T: Decodable>(bytes: impl AsRef<[u8]>) -> Result<T>
Expand description

Decodes the entire input, ensuring no trailing bytes remain.

ยงErrors

Returns an error if the encoding is invalid or if data remains after decoding the RLP item.