blob: 3011354b6ed93ea384b7390349789a542670abd5 (
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
|
//! 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,
}
}
}
}
}
|