Crate instance_of

Source
Expand description

Macro to answer the question: does it implement a trait?

This solution has a limitation:

  • In case enity is a function and trat is Fn/FnMut/FnOnce which current entity does not implement you will get compile-time error instead of false.

Macrosยง

implements
Macro implements to answer the question: does it implement a trait?
instance_of
Macro instance_of to answer the question: does it implement a trait? Alias of the macro implements.