Crates.io | is_slice |
lib.rs | is_slice |
version | 0.9.0 |
source | src |
created_at | 2021-11-29 19:36:42.872791 |
updated_at | 2024-05-11 22:36:00.647058 |
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 | 29,464 |
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