22 releases (10 breaking)
0.20.0 | Jun 27, 2024 |
---|---|
0.18.0 | Apr 30, 2024 |
0.6.5 | Mar 4, 2024 |
0.6.4 | Sep 5, 2023 |
0.0.0 | Jun 24, 2021 |
#827 in Rust patterns
3,982 downloads per month
Used in 31 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
~300–750KB
~17K SLoC