pub trait NonZero: Sealed { }
Expand description
Marker trait for non-zero numbers.
§Examples
use typerat::*;
fn is_nonzero<T: NonZero>() -> bool {
true
}
assert!(is_nonzero::<P1>());
assert!(is_nonzero::<N1>());
assert!(is_nonzero::<Q<P1>>());
assert!(is_nonzero::<Q<N1>>());
assert!(is_nonzero::<Q<P2, P3>>());
assert!(is_nonzero::<Q<N2, P3>>());
ⓘ
assert!(is_nonzero::<Z0>());
ⓘ
assert!(is_nonzero::<Q<Z0>>());