9 releases (2 stable)
Uses new Rust 2024
| 1.0.1 | Sep 22, 2025 |
|---|---|
| 1.0.0 | Sep 1, 2025 |
| 0.1.6 | Jul 3, 2025 |
| 0.1.5 | Jun 27, 2025 |
#314 in Hardware support
1,408 downloads per month
Used in 11 crates
(8 directly)
14KB
123 lines
Utilizing for working with non-zero integers.
Currently this implements a shorthand macro for creating non-zero integers from expressions at compile time:
use std::num::NonZero;
use new_zealand::nz;
fn foo(x: NonZero<u32>) {
println!("NonZero value: {x}");
}
foo(nz!(42));
foo(nz!(3 * 8));
Utilities for working with non-zero integers.
Currently this implements a shorthand macro for creating non-zero integers from literals at compile time:
use std::num::NonZero;
use new_zealand::nz;
fn foo(x: NonZero<u32>) { println!("NonZero value: {x}"); }
foo(nz!(42));
More details in the package documentation.
This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.