Germline

Struct Germline 

Source
pub struct Germline {
    pub species: Species,
    pub name: Gene,
    pub alleles: Vec<(usize, AnnotatedSequence)>,
}
Expand description

Intermediate representation for germline

Fields§

§species: Species

The species for this germline

§name: Gene

The name for the germline

§alleles: Vec<(usize, AnnotatedSequence)>

All alleles

Implementations§

Source§

impl Germline

Source

pub fn iter(&self) -> <&Self as IntoIterator>::IntoIter

Iterate over the sequences

Trait Implementations§

Source§

impl<'__de, __Context> BorrowDecode<'__de, __Context> for Germline

Source§

fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
Source§

impl CVData for Germline

Source§

type Index = (Species, Gene)

The type used for the index
Source§

fn index(&self) -> Option<Self::Index>

The numerical index or id of the item.
Source§

fn name(&self) -> Option<Cow<'_, str>>

The name of the item, this will be stored in a case insensitive manner in the crate::CVIndex but should be reported in the correct casing here.
Source§

fn synonyms(&self) -> impl Iterator<Item = &str>

Any synonyms that can be uniquely attributed to this data element. So EXACT synonyms from Obo files.
Source§

impl CVStructure<Germline> for HashMap<Species, Germlines>

Source§

type Index = (Species, Gene)

The indexing type
Source§

type IterIndexed<'a> = Box<dyn Iterator<Item = (<HashMap<Species, Germlines> as CVStructure<Germline>>::Index, Arc<Germline>)> + 'a>

The iterator to use when the index and data items are requested
Source§

type IterData<'a> = Box<dyn Iterator<Item = Arc<Germline>> + 'a>

The iterator to use when only the data items are requested
Source§

fn is_empty(&self) -> bool

See if no data items are present
Source§

fn len(&self) -> usize

The total number of data items present
Source§

fn clear(&mut self)

Clear this entire structure
Source§

fn add(&mut self, data: Arc<Germline>)

Add a sinlge data item to the structure
Source§

fn iter_indexed(&self) -> Self::IterIndexed<'_>

Iterate over all data items and return both the index and the data item
Source§

fn iter_data(&self) -> Self::IterData<'_>

Iterate over all data items
Source§

fn index(&self, index: Self::Index) -> Option<Arc<Germline>>

Get an element by the index
Source§

fn remove(&mut self, index: Self::Index)

Remove an element based on the index
Source§

impl Clone for Germline

Source§

fn clone(&self) -> Germline

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 Debug for Germline

Source§

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

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

impl<__Context> Decode<__Context> for Germline

Source§

fn decode<__D: Decoder<Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl<'de> Deserialize<'de> for Germline

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Encode for Germline

Source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl<'a> IntoIterator for &'a Germline

Source§

type IntoIter = Iter<'a, (usize, AnnotatedSequence)>

Which kind of iterator are we turning this into?
Source§

type Item = &'a (usize, AnnotatedSequence)

The type of the elements being iterated over.
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoParallelIterator for &'a Germline

Available on crate feature rayon only.
Source§

type Iter = Iter<'a, (usize, AnnotatedSequence)>

The parallel iterator type that will be created.
Source§

type Item = &'a (usize, AnnotatedSequence)

The type of item that the parallel iterator will produce.
Source§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator. Read more
Source§

impl Serialize for Germline

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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<'data, I> IntoParallelRefIterator<'data> for I
where I: 'data + ?Sized, &'data I: IntoParallelIterator,

Source§

type Iter = <&'data I as IntoParallelIterator>::Iter

The type of the parallel iterator that will be returned.
Source§

type Item = <&'data I as IntoParallelIterator>::Item

The type of item that the parallel iterator will produce. This will typically be an &'data T reference type.
Source§

fn par_iter(&'data self) -> <I as IntoParallelRefIterator<'data>>::Iter

Converts self into a parallel iterator. 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

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,