Guest User

Untitled

a guest
Feb 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. pub trait Service: Send + Sync {}
  2.  
  3. impl Service {
  4. #[inline(always)]
  5. pub fn type_id<T: ?Sized + std::any::Any>() -> std::any::TypeId {
  6. std::any::TypeId::of::<T>()
  7. }
  8.  
  9. #[inline(always)]
  10. pub fn any_type_id() -> std::any::TypeId {
  11. Service::type_id::<dyn Service>()
  12. }
  13. }
Add Comment
Please, Sign In to add comment