Skip to main content

Crate elicit_uom

Crate elicit_uom 

Source
Expand description

elicit_uom — MCP tools for the uom units-of-measurement library.

Provides two plugins:

PluginNamespaceDescription
UomQuantityPluginuom_{name}__*, uom_qty__*Quantity creation, arithmetic, conversion
UomCodePluginuom_code__*Code emission and catalog queries

§Quick start

use elicit_uom::{UomQuantityPlugin, UomCodePlugin};

let qty = UomQuantityPlugin::new();
let code = UomCodePlugin::with_bus(qty.bus());

Structs§

QuantityBusEntry
A single entry stored on the QuantityBus.
UomCodePlugin
MCP plugin providing code emission and catalog query tools.
UomError
Wrapper error carrying kind, source file, and line number.
UomQuantityPlugin
MCP plugin providing quantity creation, arithmetic, and conversion tools.

Enums§

UomErrorKind
Specific error condition within a uom operation.

Constants§

ALL_REGISTRATIONS
All 18 registration names.

Functions§

convert_to_unit
Convert a stored SI value to a target unit for a given registration.
derive_div
Derive the result registration name for lhs ÷ rhs.
derive_mul
Derive the result registration name for lhs × rhs.
derive_pow
Derive the result registration name for lhs ^ n.
derive_recip
Derive the result registration name for 1 / lhs (reciprocal).
derive_sqrt
Derive the result registration name for √lhs.
new_bus
Create a fresh, empty QuantityBus.
parse_any
Parse a value+unit string for any registration, returning the SI value and snippet.
parse_params
Parse the arguments field of a CallToolRequestParams into a typed struct.
rust_type_name
Map a registration name to its Rust uom type name.
si_unit_name
Map a registration name to its SI base unit name.
supported_units
Return the list of supported unit strings for a registration.

Type Aliases§

QuantityBus
Thread-safe UUID-keyed store of all created quantity values.