pub struct Selection<S1: BuildHasher, S2: BuildHasher> {
pub species: Option<HashSet<Species, S1>>,
pub chains: Option<HashSet<ChainType, S2>>,
pub genes: Option<HashSet<GeneType>>,
pub allele: AlleleSelection,
}Expand description
The selection rules for iterating over a selection of germlines.
Fields§
§species: Option<HashSet<Species, S1>>The species you want, None allows all, otherwise only the species specified will be returned
chains: Option<HashSet<ChainType, S2>>The chain of genes you want, None allows all, otherwise only the chains specified will be returned
genes: Option<HashSet<GeneType>>The kind of genes you want, None allows all, otherwise only the genes specified will be returned
allele: AlleleSelectionThe way of handling alleles you want
Implementations§
Source§impl<S1: BuildHasher, S2: BuildHasher> Selection<S1, S2>
impl<S1: BuildHasher, S2: BuildHasher> Selection<S1, S2>
Sourcepub fn species(self, species: impl Into<HashSet<Species, S1>>) -> Self
pub fn species(self, species: impl Into<HashSet<Species, S1>>) -> Self
Builder pattern method to add a species selection, will replace any previously set species selection
Sourcepub fn chain(self, chains: impl Into<HashSet<ChainType, S2>>) -> Self
pub fn chain(self, chains: impl Into<HashSet<ChainType, S2>>) -> Self
Builder pattern method to add a chain selection, will replace any previously set chain selection
Sourcepub fn gene(self, genes: impl Into<HashSet<GeneType>>) -> Self
pub fn gene(self, genes: impl Into<HashSet<GeneType>>) -> Self
Builder pattern method to add a gene selection, will replace any previously set gene selection
Sourcepub fn allele(self, allele: AlleleSelection) -> Self
pub fn allele(self, allele: AlleleSelection) -> Self
Builder pattern method to add an allele selection, will replace any previously set allele selection
Source§impl<'a, S1: BuildHasher + Clone + Send + Sync + 'a, S2: BuildHasher + Clone + Send + Sync + 'a> Selection<S1, S2>
impl<'a, S1: BuildHasher + Clone + Send + Sync + 'a, S2: BuildHasher + Clone + Send + Sync + 'a> Selection<S1, S2>
Sourcepub fn germlines(
self,
cv: &'a CVIndex<IMGT>,
) -> impl Iterator<Item = Allele<'a>>
pub fn germlines( self, cv: &'a CVIndex<IMGT>, ) -> impl Iterator<Item = Allele<'a>>
Get the selected alleles
Sourcepub fn par_germlines(
self,
cv: &'a CVIndex<IMGT>,
) -> impl ParallelIterator<Item = Allele<'a>>
pub fn par_germlines( self, cv: &'a CVIndex<IMGT>, ) -> impl ParallelIterator<Item = Allele<'a>>
Get the selected alleles in parallel fashion, only available if you enable the feature “rayon” (on by default)
Trait Implementations§
Source§impl<S1: Clone + BuildHasher, S2: Clone + BuildHasher> Clone for Selection<S1, S2>
impl<S1: Clone + BuildHasher, S2: Clone + BuildHasher> Clone for Selection<S1, S2>
Source§impl<S1: Debug + BuildHasher, S2: Debug + BuildHasher> Debug for Selection<S1, S2>
impl<S1: Debug + BuildHasher, S2: Debug + BuildHasher> Debug for Selection<S1, S2>
Source§impl<S1: BuildHasher, S2: BuildHasher> Default for Selection<S1, S2>
impl<S1: BuildHasher, S2: BuildHasher> Default for Selection<S1, S2>
Source§impl<S1: PartialEq + BuildHasher, S2: PartialEq + BuildHasher> PartialEq for Selection<S1, S2>
impl<S1: PartialEq + BuildHasher, S2: PartialEq + BuildHasher> PartialEq for Selection<S1, S2>
impl<S1: Eq + BuildHasher, S2: Eq + BuildHasher> Eq for Selection<S1, S2>
impl<S1: BuildHasher, S2: BuildHasher> StructuralPartialEq for Selection<S1, S2>
Auto Trait Implementations§
impl<S1, S2> Freeze for Selection<S1, S2>
impl<S1, S2> RefUnwindSafe for Selection<S1, S2>where
S1: RefUnwindSafe,
S2: RefUnwindSafe,
impl<S1, S2> Send for Selection<S1, S2>
impl<S1, S2> Sync for Selection<S1, S2>
impl<S1, S2> Unpin for Selection<S1, S2>
impl<S1, S2> UnwindSafe for Selection<S1, S2>where
S1: UnwindSafe,
S2: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> HighestOf<T> for T
impl<T> HighestOf<T> for T
Source§type HighestLevel = T
type HighestLevel = T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more