Print Variable Type
The following function returns and prints the type of a variable in the terminal. It can receive any variable type and returns a string reference. Can be useful when debugging or creating test.
fn print_type_of(_: &T) -> &str {
std::any::type_name::()
}
More Logs