session_log/output.rs
1
2
3/// Output trait is used to define a common interface for all types that can both be written to a file
4/// and printed to the console. This is the basic traits for each components of the log.
5pub trait Output {
6 /// Writes a string representation that is suitable for writing to a file.
7 fn for_write(&self, f: &mut impl std::fmt::Write);
8
9 /// Writes a string representation that is suitable for printing to the console.
10 fn for_print(&self, f: &mut impl std::fmt::Write);
11}