Allele

Trait Allele 

Source
pub trait Allele:
    Clone
    + Copy
    + Send
    + Sync
    + Debug {
    // Required method
    fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)
       where Self: Sized;
}
Expand description

Standard Allele, suitable for crate::genotype::Genotype. Implemented for a set of primitives by default

Required Methods§

Source

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)
where Self: Sized,

Hash a slice of alleles. This method allows type-specific hashing behavior. For most types, this uses the standard Hash trait. For float types (f32, f64), this hashes the bytes for deterministic results.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Allele for bool

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for char

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for f32

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for f64

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for i8

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for i16

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for i32

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for i64

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for i128

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for isize

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for u8

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for u16

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for u32

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for u64

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for u128

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for ()

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl Allele for usize

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0> Allele for (TupleElement0,)
where TupleElement0: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1> Allele for (TupleElement0, TupleElement1)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2> Allele for (TupleElement0, TupleElement1, TupleElement2)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash, TupleElement7: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash, TupleElement7: Allele + Hash, TupleElement8: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash, TupleElement7: Allele + Hash, TupleElement8: Allele + Hash, TupleElement9: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash, TupleElement7: Allele + Hash, TupleElement8: Allele + Hash, TupleElement9: Allele + Hash, TupleElement10: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Source§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11> Allele for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11)
where TupleElement0: Allele + Hash, TupleElement1: Allele + Hash, TupleElement2: Allele + Hash, TupleElement3: Allele + Hash, TupleElement4: Allele + Hash, TupleElement5: Allele + Hash, TupleElement6: Allele + Hash, TupleElement7: Allele + Hash, TupleElement8: Allele + Hash, TupleElement9: Allele + Hash, TupleElement10: Allele + Hash, TupleElement11: Allele + Hash,

Source§

fn hash_slice(slice: &[Self], hasher: &mut impl Hasher)

Implementors§