Trait RankUnsigned
Source pub trait RankUnsigned: AccessUnsigned {
// Required methods
fn rank(&self, symbol: Self::Item, i: usize) -> Option<usize>;
unsafe fn rank_unchecked(&self, symbol: Self::Item, i: usize) -> usize;
}
Expand description
A trait for the support of rank query over an Unsigned alphabet.
Returns the number of occurrences in the indexed sequence of symbol up to
position i excluded.
Returns the number of occurrences in the indexed sequence of symbol up to
position i excluded. The function does not check boundaries.
§Safety
Calling this method with an out-of-bounds index is undefined behavior.