Trait rstats::Printing

source ·
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

Method to serialize generic items, slices, and slices of Vecs. Adds square brackets around Vecs (prettier lists). Implementation code is in printing.rs.

Method to serialize generic items, slices, and slices of Vecs. Implementation code is in printing.rs.

Provided Methods

Printable in red

Printable in green

Printable in blue

Printable in yellow

Printable in magenta

Printable in cyan

Method to write vector(s) to file f (space separated, without brackets). Passes up io errors

Method to print vector(s) to stdout (space separated,without brackets).

Implementations on Foreign Types

Implementors