scsys_core/
utils.rs

1/*
2    Appellation: utils <module>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5#[cfg(feature = "alloc")]
6pub use self::alloc::*;
7#[cfg(feature = "std")]
8pub use self::std::*;
9
10#[cfg(feature = "alloc")]
11mod alloc;
12#[cfg(feature = "std")]
13mod std;
14
15/// Compare two types
16pub fn type_of<U, V>() -> bool
17where
18    U: core::any::Any + ?Sized,
19    V: core::any::Any + ?Sized,
20{
21    core::any::TypeId::of::<U>() == core::any::TypeId::of::<V>()
22}