Macro custom_print::define_println[][src]

macro_rules! define_println {
    ( $name:ident, $($args:tt)* ) => { ... };
}
Expand description

Defines println macro that defines a println macro that uses the specified writer.

The first argument specifies the generated macro name. The writer itself is specified by the rest arguments with the define_writer macros.

See also define_print and define_try_println macros.

Examples

let mut string = String::new();
custom_print::define_println!(cprintln, fmt, |value: &str| string += value);

assert_eq!(cprintln!("value"), ());
assert_eq!(string, "value\n");