| Crates.io | inspect_type |
| lib.rs | inspect_type |
| version | 0.16.0 |
| created_at | 2021-11-30 06:29:07.025209+00 |
| updated_at | 2025-06-21 14:27:26.91138+00 |
| description | Diagnostic-purpose tools to inspect type of a variable and its size. |
| homepage | https://github.com/Wandalen/wTools/tree/master/module/core/inspect_type |
| repository | https://github.com/Wandalen/wTools/tree/master/module/core/inspect_type |
| max_upload_size | |
| id | 489667 |
| size | 13,119 |
inspect_typeDiagnostic-purpose tools to inspect type of a variable and its size.
// #![ cfg_attr( feature = "nightly", feature( type_name_of_val ) ) ]
pub use inspect_type::*;
#[ cfg( feature = "nightly" ) ]
{
inspect_type_of!( &[ 1, 2, 3 ][ .. ] );
// < sizeof( &[1, 2, 3][..] : &[i32] ) = 16
inspect_type_of!( &[ 1, 2, 3 ] );
// < sizeof( &[1, 2, 3] : &[i32; 3] ) = 8
}
cargo add inspect_type
git clone https://github.com/Wandalen/wTools
cd wTools
cargo run --example inspect_type_trivial