pub fn decode_from_slice_static<D, const CAP: usize, C>(
src: &[u8; CAP],
config: C,
) -> Result<D, DecodeError>Available on crate feature
static-size only.Expand description
Attempt to decode a given type D from the given slice with a compile-time bound check.
This function ensures that the target type D cannot exceed the provided buffer capacity CAP at compile-time.
ยงErrors
Returns a DecodeError if the slice contains invalid data.