Crate typing_tools

Source
Expand description

Collection of general purpose tools for type checking.

§Module :: typing_tools

experimental rust-status docs.rs Open in Gitpod discord

Collection of general purpose tools for type checking.

§Basic use-case

use typing_tools::*;

let src = Box::new( true );
assert_eq!( implements!( src => Copy ), false );
assert_eq!( implements!( src => Clone ), true );

§To add to your project

cargo add typing_tools

§Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/typing_tools_trivial
cargo run

Modules§

dependency
Namespace with dependencies.
exposed
Exposed namespace of the module.
orphan
Orphan namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
typing
Collection of general purpose tools for type checking.

Macros§

implements
Macro implements to answer the question: does it implement a trait?
inspect_to_str_type_of
Macro to inspect type of a variable and its size exporting it as a string.
inspect_type_of
Macro to inspect type of a variable and its size printing into stdout and exporting it as a string.
instance_of
Macro instance_of to answer the question: does it implement a trait? Alias of the macro implements.
is_slice
Macro to answer the question: is it a slice?