Module orx_pinned_vec::utils::slice
source · Expand description
Utility functions to make slice-like PinnedVec implementations more convenient.
Functions§
- Returns whether or not element with the given pointer belongs to the given
slice
. This method has O(1) time complexity. - Returns whether or not
element
with the given reference belongs to the givenslice
. This method has O(1) time complexity. - Returns the index of the
element
with the given reference inside theslice
. This method has O(1) time complexity. - Returns the index of the
element
with the given reference inside theslice
. This method has O(1) time complexity. - Returns the inclusive being and exclusive end of the given
range
. The range is bounded by thevec_len
if it is known and provided.