ttype

Crates.iottype
lib.rsttype
version0.1.1
sourcesrc
created_at2020-05-18 23:26:25.564719
updated_at2020-05-21 17:30:07.608016
descriptionttype - A quick macro for printing or returning the type of a variable
homepagehttps://github.com/deg4uss3r/ttype
repositoryhttps://github.com/deg4uss3r/ttype
max_upload_size
id243279
size3,799
Ricky Hosfelt (deg4uss3r)

documentation

README

ttype

A quick crate that creates a macro to print or return the type of a variable.

Right now this depends on the unstable fetaures type_name_of_val() so it will require both Rust Nightly and the #![feature(type_name_of_val)] attribute for your debugging needs.

Example:

#![feature(type_name_of_val)]
#[macro_use]
use ttype::ptype;

fn main() {
    let x = "Hello, world";

    //prints &str
    ptype!(&x);
}
Commit count: 3

cargo fmt