Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deg4uss3r/ttype
A quick Rust macro crate for printing or returning the type of a variable
https://github.com/deg4uss3r/ttype
Last synced: 26 days ago
JSON representation
A quick Rust macro crate for printing or returning the type of a variable
- Host: GitHub
- URL: https://github.com/deg4uss3r/ttype
- Owner: deg4uss3r
- License: mit
- Created: 2020-05-18T18:27:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-21T17:29:48.000Z (over 4 years ago)
- Last Synced: 2024-11-15T00:49:37.517Z (about 1 month ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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:
```rust
#![feature(type_name_of_val)]
#[macro_use]
use ttype::ptype;fn main() {
let x = "Hello, world";//prints &str
ptype!(&x);
}
```