Output

Trait Output 

Source
pub trait Output {
    // Required methods
    fn for_write(&self, f: &mut impl Write);
    fn for_print(&self, f: &mut impl Write);
}
Expand description

Output trait is used to define a common interface for all types that can both be written to a file and printed to the console. This is the basic traits for each components of the log.

Required Methods§

Source

fn for_write(&self, f: &mut impl Write)

Writes a string representation that is suitable for writing to a file.

Source

fn for_print(&self, f: &mut impl Write)

Writes a string representation that is suitable for printing to the console.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§