logo
macro_rules! instance_of {
    ( $( $arg : tt )+ ) => { ... };
}
Expand description

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

Sample

use implements::instance_of;

dbg!( instance_of!( 13_i32 => Copy ) );
// < instance_of!( 13_i32 => Copy ) : true
dbg!( instance_of!( Box::new( 13_i32 ) => Copy ) );
// < instance_of!( 13_i32 => Copy ) : false