pub trait AccessBin {
// Required methods
fn get(&self, i: usize) -> Option<bool>;
unsafe fn get_unchecked(&self, i: usize) -> bool;
}
Expand description
A trait for the support of get
query over the binary alphabet.
Required Methods§
sourcefn get(&self, i: usize) -> Option<bool>
fn get(&self, i: usize) -> Option<bool>
Returns the bit at the given position i
,
or None
if i
is out of bounds.
sourceunsafe fn get_unchecked(&self, i: usize) -> bool
unsafe fn get_unchecked(&self, i: usize) -> bool
Returns the symbol at the given position i
.
Safety
Calling this method with an out-of-bounds index is undefined behavior.