As far as I understand, and I'm no expert - types are just compile time structures. They don't exist during runtime. Although some procedural macros can use tricks* to get around it. For example println! macros.
EDIT: By tricks I mean println! parses arguments and applies apropriate macros to given arguments. So if you try to use println!("{0:b} ", 2.3f32)" you get an error, std::fmt::Binary not implemented for f32.
Macros can’t look at types, because macro expansion happens on a purely syntactical level, before names are resolved and types are inferred. What you are asking for is impossible by design.
println! etc. are not special by the way, they just generate code that works regardless of the specific types of the arguments (using the std::fmt::* traits).