pub trait Printing<T>: Sized {
fn to_str(self) -> String;
fn to_plainstr(self) -> String;
fn rd(self) -> String { ... }
fn gr(self) -> String { ... }
fn bl(self) -> String { ... }
fn yl(self) -> String { ... }
fn mg(self) -> String { ... }
fn cy(self) -> String { ... }
fn wvec(self, f: &mut File) -> Result<(), Error> { ... }
fn pvec(self) { ... }
}
Expand description
Trait to serialize slices of generic items &[T]
(vectors)
and slices of Vecs of generic items &[Vec<T>]
(matrices).
All are converted into printable strings and optionally coloured.
Also, methods to serialize and render the resulting string
in bold ANSI terminal colours.
Required Methods
sourcefn to_str(self) -> String
fn to_str(self) -> String
Method to serialize generic items, slices, and slices of Vecs.
Adds square brackets around Vecs (prettier lists).
Implementation code is in printing.rs
.
sourcefn to_plainstr(self) -> String
fn to_plainstr(self) -> String
Method to serialize generic items, slices, and slices of Vecs.
Implementation code is in printing.rs
.