daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top