devela/num/
no.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// devela::num::no
//
//! Not a number.
//

/// Represents the absence of a number.
///
/// This can be used anywhere an implementation of [`Num`][super::Num] is expected,
/// since it implements all the numeric traits, but does nothing.
pub type NoNum = ();

#[rustfmt::skip]
impl super::Num for NoNum {
    type Inner = ();
    type Out = ();
    type Rhs = ();

    fn num_into(self) -> Self::Inner {}
}

#[cfg(_int··)]
#[cfg_attr(feature = "nightly_doc", doc(cfg(_int··)))]
impl super::NumInt for NoNum {
    type OutI = ();
}