Registry / utility / tor-units

tor-units

JSON →
library0.42.0rscratesunverified

Provides macros for types which are constrained within a range, ensuring invalid values are unrepresentable.

# Cargo.toml [dependencies] tor-units = "0.42.0"
INSTALL
IMPORT
SIG · TOR-UNITS
T
tor-units
utilityrustv0.42.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BoundedInt
use tor_units::BoundedInt;

Creates a bounded integer value within a specified range.

use tor_units::BoundedInt; fn main() { let val = BoundedInt::<0, 100>::new(50).unwrap(); println!("Value: {}", val.get()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.42.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
tor-units — cargo add tor-units · libregistry