pub fn borrow_decode_from_slice_static_with_context<'a, Context, D, const CAP: usize, C>(
src: &'a [u8; CAP],
config: C,
context: Context,
) -> Result<D, DecodeError>where
D: BorrowDecode<'a, Context> + StaticSize,
C: Config,
C::Mode: InternalFingerprintGuard<D, C>,Available on crate feature
static-size only.Expand description
Attempt to borrow-decode a given type D from the given slice with a compile-time bound check
and a decoding context.
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.