use-trait 0.1.0

Primitive biological trait and phenotype vocabulary for RustUse
Documentation
  • Coverage
  • 100%
    29 out of 29 items documented1 out of 19 items with examples
  • Size
  • Source code size: 11.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 753.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-biology
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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.

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");