Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub trait Service: Send + Sync {}
- impl Service {
- #[inline(always)]
- pub fn type_id<T: ?Sized + std::any::Any>() -> std::any::TypeId {
- std::any::TypeId::of::<T>()
- }
- #[inline(always)]
- pub fn any_type_id() -> std::any::TypeId {
- Service::type_id::<dyn Service>()
- }
- }
Add Comment
Please, Sign In to add comment