use-trait 0.1.0

Primitive biological trait and phenotype vocabulary for RustUse
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# use-trait

Primitive biological trait and phenotype vocabulary.

`use-trait` stores descriptive trait names, values, broad trait kinds, and ordered phenotype records. It does not infer heredity, model dominance/recessiveness, implement genetics calculators, or predict traits.

```rust
use use_trait::{Phenotype, TraitKind, TraitName, TraitValue};

let value = TraitValue::new(TraitName::new("leaf shape").unwrap(), "lobed")
    .unwrap()
    .with_kind(TraitKind::Morphological);
let phenotype = Phenotype::new(vec![value]);

assert_eq!(phenotype.len(), 1);
assert_eq!(phenotype.traits()[0].value(), "lobed");
```