Trait typerat::NotOne

source ·
pub trait NotOne: Sealed { }
Expand description

Marker trait for not-one numbers.

§Examples

use typerat::*;

fn is_notone<T: NotOne>() -> bool {
    true
}

assert!(is_notone::<Z0>());
assert!(is_notone::<N1>());
assert!(is_notone::<Q<Z0>>());
assert!(is_notone::<Q<N1>>());
assert!(is_notone::<Q<P2, P3>>());
assert!(is_notone::<Q<N2, P3>>());
assert!(is_notone::<P1>());
assert!(is_notone::<Q<P1>>());

Implementations on Foreign Types§

source§

impl NotOne for Z0

source§

impl<U> NotOne for NInt<U>
where U: NonZeroUnsigned,

source§

impl<U, B> NotOne for PInt<UInt<U, B>>
where U: NonZeroUnsigned, B: Bit,

Implementors§

source§

impl<N> NotOne for Q<N>
where N: Numerator + NotOne,

source§

impl<N, D> NotOne for Q<N, D>
where N: Numerator<D>, D: Denominator + NotOne,