Macro test_tools::implements
source · macro_rules! implements { ( $( $arg : tt )+ ) => { ... }; }
Expand description
Macro implements
to answer the question: does it implement a trait?
§Basic use-case.
use implements::*;
dbg!( implements!( 13_i32 => Copy ) );
// < implements!( 13_i32 => Copy ) : true
dbg!( implements!( Box::new( 13_i32 ) => Copy ) );
// < implements!( 13_i32 => Copy ) : false