use-mineral 0.1.0

Primitive mineral vocabulary for RustUse
Documentation
  • Coverage
  • 9.52%
    4 out of 42 items documented1 out of 16 items with examples
  • Size
  • Source code size: 13.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 914.34 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geology
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-mineral

Small mineral vocabulary primitives for RustUse.

Example

use use_mineral::{CrystalSystem, MineralClass, MineralName, MohsHardness};

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let name = MineralName::new("Quartz")?;
let hardness = MohsHardness::new(7.0)?;

assert_eq!(name.as_str(), "Quartz");
assert_eq!(MineralClass::Silicate.to_string(), "silicate");
assert_eq!(CrystalSystem::Trigonal.to_string(), "trigonal");
assert_eq!(hardness.value(), 7.0);
# Ok(())
# }