| Crates.io | is_slice |
| lib.rs | is_slice |
| version | 0.14.0 |
| created_at | 2021-11-29 19:36:42.872791+00 |
| updated_at | 2025-06-21 07:31:39.51161+00 |
| description | Macro to answer the question: is it a slice? |
| homepage | https://github.com/Wandalen/wTools/tree/master/module/core/is_slice |
| repository | https://github.com/Wandalen/wTools/tree/master/module/core/is_slice |
| max_upload_size | |
| id | 489463 |
| size | 10,099 |
is_sliceMacro 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