TypeDef

Identify or compare types, get or print type names.

Since Rust 1.0, this library can only work on nightly Rust.

Build Status

Quick example

```rust use typedef::{ TypeDef };

// type name querying:

assert!(TypeDef::name_of::() == "i64");

// and also type value:

let typedef = TypeDef::of::();

assert!(typedef.is::()); assert!(typedef.get_str() == "i64"); assert!(typedef == TypeDef::of::());

println!("type is {:?}", typedef); ```

Usage

Put this in your Cargo.toml:

toml [dependencies] typedef = "*"

And this in your crate root:

rust extern crate typedef;

Resources

License

MIT