Selection

Struct Selection 

Source
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: AlleleSelection

The way of handling alleles you want

Implementations§

Source§

impl<S1: BuildHasher, S2: BuildHasher> Selection<S1, S2>

Source

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

Source

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

Source

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

Source

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>

Source

pub fn germlines( self, cv: &'a CVIndex<IMGT>, ) -> impl Iterator<Item = Allele<'a>>

Get the selected alleles

Source

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>

Source§

fn clone(&self) -> Selection<S1, S2>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S1: Debug + BuildHasher, S2: Debug + BuildHasher> Debug for Selection<S1, S2>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S1: BuildHasher, S2: BuildHasher> Default for Selection<S1, S2>

Source§

fn default() -> Self

Get a default selection, which gives all kinds and genes but only returns the first allele

Source§

impl<S1: PartialEq + BuildHasher, S2: PartialEq + BuildHasher> PartialEq for Selection<S1, S2>

Source§

fn eq(&self, other: &Selection<S1, S2>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S1: Eq + BuildHasher, S2: Eq + BuildHasher> Eq for Selection<S1, S2>

Source§

impl<S1: BuildHasher, S2: BuildHasher> StructuralPartialEq for Selection<S1, S2>

Auto Trait Implementations§

§

impl<S1, S2> Freeze for Selection<S1, S2>
where S1: Freeze, S2: Freeze,

§

impl<S1, S2> RefUnwindSafe for Selection<S1, S2>

§

impl<S1, S2> Send for Selection<S1, S2>
where S1: Send, S2: Send,

§

impl<S1, S2> Sync for Selection<S1, S2>
where S1: Sync, S2: Sync,

§

impl<S1, S2> Unpin for Selection<S1, S2>
where S1: Unpin, S2: Unpin,

§

impl<S1, S2> UnwindSafe for Selection<S1, S2>
where S1: UnwindSafe, S2: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HighestOf<T> for T

Source§

type HighestLevel = T

This is the highest complexity level out of Self and the type parameter
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AtLeast<T> for T

Source§

impl<T> AtMax<T> for T