20 releases
new 0.18.0 | Apr 30, 2024 |
---|---|
0.6.5 | Mar 4, 2024 |
0.6.4 | Sep 5, 2023 |
0.6.2 | Jun 30, 2023 |
0.0.0 | Jun 24, 2021 |
#688 in Rust patterns
2,842 downloads per month
Used in 30 crates
(8 directly)
30KB
579 lines
tor-units
Safe wrappers for primitive numeric types.
Overview
This crate is part of Arti, a project to implement Tor in Rust. It provides safe wrappers for primitive numeric wrappers used in other parts of Arti. In particular, it provides:
- a bounded i32 with both checked and clamping constructors,
- an integer milliseconds wrapper with conversion to
Duration
- an integer seconds wrapper with conversion to
Duration
- a percentage wrapper, to prevent accidental failure to divide by 100.
- a SendMeVersion which can be compared only.
License: MIT OR Apache-2.0
lib.rs
:
Dependencies
~1.5MB
~34K SLoC