Macro to answer the question: is it a slice?
use is_slice::*;
dbg!( is_slice!( Box::new( true ) ) );
// < is_slice!(Box :: new(true)) = false
dbg!( is_slice!( &[ 1, 2, 3 ] ) );
// < is_slice!(& [1, 2, 3]) = false
dbg!( is_slice!( &[ 1, 2, 3 ][ .. ] ) );
// < is_slice!(& [1, 2, 3] [..]) = true
cargo add is_slice
git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/is_slice_trivial
cargo run