Trait qwt::SelectUnsigned
source · pub trait SelectUnsigned: AccessUnsigned {
// Required methods
fn select(&self, symbol: Self::Item, i: usize) -> Option<usize>;
unsafe fn select_unchecked(&self, symbol: Self::Item, i: usize) -> usize;
}
Expand description
A trait for the support of ``selectquery over an
Unsigned` alphabet.
Required Methods§
sourcefn select(&self, symbol: Self::Item, i: usize) -> Option<usize>
fn select(&self, symbol: Self::Item, i: usize) -> Option<usize>
Returns the position in the indexed sequence of the i
th occurrence of
symbol
.
We start counting from 1, so that select(symbol, 1)
refers to the first
occurrence of symbol
. select(symbol, 0)
returns None
.
sourceunsafe fn select_unchecked(&self, symbol: Self::Item, i: usize) -> usize
unsafe fn select_unchecked(&self, symbol: Self::Item, i: usize) -> usize
Returns the position in the indexed sequence of the i
th occurrence of
symbol
.
We start counting from 1, so that select(symbol, 1)
refers to the first
occurrence of symbol
.
Safety
Calling this method if the i
th occurrence of symbol
does not exist is undefined behavior.