Trait noodles_core::position::SequenceIndex
source · pub trait SequenceIndex<T> {
type Output: ?Sized;
// Required methods
fn get(self, sequence: &[T]) -> Option<&Self::Output>;
fn get_mut(self, sequence: &mut [T]) -> Option<&mut Self::Output>;
fn index(self, sequence: &[T]) -> &Self::Output;
fn index_mut(self, sequence: &mut [T]) -> &mut Self::Output;
}
Expand description
A 1-based index for sequences.
Required Associated Types§
Required Methods§
sourcefn get(self, sequence: &[T]) -> Option<&Self::Output>
fn get(self, sequence: &[T]) -> Option<&Self::Output>
Returns a reference to the output of the given index.
sourcefn get_mut(self, sequence: &mut [T]) -> Option<&mut Self::Output>
fn get_mut(self, sequence: &mut [T]) -> Option<&mut Self::Output>
Returns a mutable reference to the output of the given index.