Last active
February 19, 2024 17:43
-
-
Save luabida/8de13e2710383a6d9b5f06f59d5794d3 to your computer and use it in GitHub Desktop.
[rs] Get type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn print_type<T>(_: &T) { | |
println!("{}", std::any::type_name::<T>()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment