pub unsafe fn read_bounded_vec_at<T>(
bytes: &[u8],
offset: &mut usize,
metadata: &BoundedVecMetadata,
) -> BoundedVec<T>where
T: Clone,
Expand description
Creates a BoundedVec
from the sequence of values provided in bytes
buffer.
§Safety
This is higly unsafe. This function doesn’t ensure alignment and correctness of provided buffer. The responsibility of such checks is on the caller.
The T
type needs to be either a primitive or struct consisting of
primitives. It cannot contain any nested heap-backed stucture (like vectors,
slices etc.).