summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 45aea0351516cc2a5ca57f27243b2efdfedc9886 (plain)
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
26
27
28
#![deny(clippy::all, clippy::pedantic)]

pub use ridicule_macros::mock;

#[doc(hidden)]
pub mod __private
{
    pub mod type_id
    {
        #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
        pub struct TypeID
        {
            id: usize,
        }

        impl TypeID
        {
            #[inline]
            #[must_use]
            pub fn of<T>() -> Self
            {
                Self {
                    id: Self::of::<T> as usize,
                }
            }
        }
    }
}