Function subbvec
pub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(
bvec: BoundedVec<T, SrcMaxLen>,
offset: u32,
) -> BoundedVec<T, DstMaxLen>
pub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(
bvec: BoundedVec<T, SrcMaxLen>,
offset: u32,
) -> BoundedVec<T, DstMaxLen>
Returns
DstMaxLenelements from a source BoundedVec, starting atoffset.offsetmust not be larger than the original length, andDstLenmust not be larger than the total number of elements pastoffset(including the zeroed elements pastlen()).Only elements at the beginning of the vector can be removed: it is not possible to also remove elements at the end of the vector by passing a value for
DstLenthat is smaller thanlen() - offset.Examples: