Skip to main content

Crate use_sediment

Crate use_sediment 

Source
Expand description

§use-sediment

Small sediment vocabulary primitives for RustUse.

§Example

use use_sediment::{GrainSize, Roundness, SedimentKind, SedimentName, Sorting};

let name = SedimentName::new("Alluvial sand")?;
let grain_size = GrainSize::new(0.25)?;

assert_eq!(name.as_str(), "Alluvial sand");
assert_eq!(SedimentKind::Sand.to_string(), "sand");
assert_eq!(grain_size.millimeters(), 0.25);
assert_eq!(Sorting::WellSorted.to_string(), "well-sorted");
assert_eq!(Roundness::SubRounded.to_string(), "sub-rounded");

Structs§

GrainSize
SedimentName

Enums§

GrainSizeError
Roundness
SedimentKind
SedimentParseError
SedimentTextError
Sorting