pub trait GrowthWithConstantTimeAccess: Growth {
// Required method
fn get_fragment_and_inner_indices_unchecked(
&self,
element_index: usize
) -> (usize, usize);
}Expand description
Growth strategy of a split vector which allows for constant time access to the elements.
Required Methods§
sourcefn get_fragment_and_inner_indices_unchecked(
&self,
element_index: usize
) -> (usize, usize)
fn get_fragment_and_inner_indices_unchecked( &self, element_index: usize ) -> (usize, usize)
Returns the location of the element with the given element_index on the split vector as a tuple of (fragment-index, index-within-fragment).
Notice that unlike the Growth::get_fragment_and_inner_indices:
- this method does not receive the current state of the split vector,
- therefore, it does not perform bounds check,
- and hence, returns the expected fragment and within-fragment indices for any index computed by the constant access time function.
Object Safety§
This trait is not object safe.