1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Compile-time dimensional analysis for physical quantities.
//!
//! This module provides type-safe physical quantity tracking using phantom types
//! and typenum type-level integers. Named newtypes like [`Force`](crate::units::si::Force),
//! [`Voltage`](crate::units::si::Voltage), and [`Energy`](crate::units::si::Energy) produce
//! clear compiler error messages ("expected Force, found Mass") while the generic
//! [`Qty`](crate::units::qty::Qty) type handles exotic dimension combinations.
//!
//! # Architecture
//!
//! - **Named newtypes** (30 types): `Force`, `Voltage`, `Energy`, etc. — best error messages
//! - **Generic `Qty<D>`**: Fallback for intermediate/exotic dimensions — uses typenum Dim
//! - **Blanket `Mul`/`Div`**: Any `Qty<D1> * Qty<D2>` computes output dimension via typenum
//! - **`dim!` macro**: Ergonomic dimension-checked arithmetic: `dim!(ctx, Force: m * a)`
//! - **`assert_dim!`**: Compile-time checkpoint assertions
//! - **`const_assert_dim!`**: Compile-time formula verification with custom error messages
/// Compile-time dimension-assertion macros (`assert_dim!`, `const_assert_dim!`).
/// Dimensional calculus: differentiation and integration that track dimensions.
/// Physical constants as dimension-typed symbolic expressions.
/// Exact conversion factor constants with derivation verification tests.
/// Unit-conversion helpers between SI prefixes and common non-SI units.
/// Dimension vectors: phantom-typed compile-time SI dimension tracking.
/// Runtime dimension inference for expression trees.
/// Generic dimensioned quantity wrapper and arithmetic operators.
/// Named SI newtypes (e.g. `Force`, `Voltage`, `Energy`) with constructor helpers.
// Re-export all public items for `use symplex::units::*`
pub use *;
pub use *;
pub use *;
// conversions adds impls, no new public types to re-export
// calculus re-exports its own items
pub use *;
pub use *;