Struct debugit::DebugIt [] [src]

pub struct DebugIt<T>(pub T);

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

Otherwise, falls back to print something else.

On Rust stable, it always has to print something else.

Examples

use debugit::DebugIt as D;

fn process_something<T>(x: T) {
    println!("starting with {:?}", D(&x));
}

Trait Implementations

impl<T: Copy> Copy for DebugIt<T>
[src]

impl<T: Clone> Clone for DebugIt<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Debug for DebugIt<T>
[src]

Formats the value using the given formatter.

impl<T> Debug for DebugIt<T> where
    T: Debug
[src]

Formats the value using the given formatter.