Expand description
Safe, high-level Rust interface to GNU Units.
Provides unit parsing, conversion, and definition listing backed by the
vendored C library exposed through gnu_units_sys.
Re-exports§
pub use gnu_units_sys;
Structs§
- Definition
- A single entry from the GNU units definitions database.
- Unit
Unitwraps a GNU unitsunittypefor safe use from Rust.- Units
Error UnitsErrorwraps a raw error code returned by the GNU units C library.
Enums§
- Definition
Kind - The kind of a definition entry in the GNU units database.
Functions§
- conformable
- Finds all unit definitions that are conformable with
expr. - convert
- Parses
fromandtoas GNU units expressions and returns the numeric conversion factor fromfromtoto. - list_
definitions - Returns all unit definitions from the embedded GNU units database.
- parse
- Convenience free function, equivalent to
Unit::parse.
Type Aliases§
- Result
- Convenience alias for
std::result::Result<T, UnitsError>.