summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 3a1d983d6b51c96be756864ad80c2129f96c910a (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
29
30
31
32
33
34
35
36
//! Mocking library supporting non-static generics.
#![deny(clippy::all, clippy::pedantic, missing_docs)]

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,
                }
            }
        }
    }

    pub enum CallCountExpectation
    {
        Never,
        Unlimited,
        Times(u32),
    }
}