pub trait Printable {
// Required methods
fn print<F>(&self, func: F)
where F: Fn(&str) -> String;
fn println<F>(&self, func: F)
where F: Fn(&str) -> String;
fn print_positioned<F>(&self, x: i32, y: i32, func: F)
where F: Fn(&str) -> String;
}
Expand description
§Printable
supports calling print
, write
, render
and style
on any type
e.g. "hello".print(|s| in_red(s))
Required Methods§
Object Safety§
This trait is not object safe.