Crate pi_print_any

Crate pi_print_any 

Source
Expand description

output without the trait bounds (using specialization to find the right impl anyway)

output value for type of impl Debug, output type name for unimplDebug.

§for example:

#[derive(Debug)]
struct A(usize);
struct B(usize);
fn main() {
	println!("{:?}", A(1)); // output: A(1)
	println!("{:?}", B(1)); // output: `pi_print_any::B`
}

NOTE: This uses experimental Rust features and is therefore by itself experimental and unstable, and has all the problems of feature(specialization).

Macros§

out_any
output a message by a specified way, and then each value’s debug representation (if it has one)
print_any
output a message by print!, and then each value’s debug representation (if it has one)
println_any
output a message by println!, and then each value’s debug representation (if it has one)

Structs§

DebugIt
This type always implements Debug. Uses specialization to use the inner value’s Debug (which it should basically always have).

Functions§

new_debugit
This type always implements Debug. Uses specialization to use the inner value’s Debug (which it should basically always have).