-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b658c26
commit 4830f24
Showing
4 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub mod byte_reader; | ||
pub mod byte_writer; | ||
pub mod char_writer; | ||
pub mod string_writer; | ||
pub mod writer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
use std::io; | ||
|
||
pub trait Writer { | ||
/// It writes one byte to the output (stdout or file). | ||
/// It writes one byte to the output. | ||
/// | ||
/// # Errors | ||
/// | ||
/// Will return an error if it can't write the byte to the output. | ||
/// Will return an error if it can't write the byte. | ||
fn write_byte(&mut self, byte: u8) -> io::Result<()>; | ||
|
||
/// It writes a string to the output (stdout or file). | ||
/// It writes a string to the output. | ||
/// | ||
/// # Errors | ||
/// | ||
/// Will return an error if it can't write the string (as bytes) to the output. | ||
/// Will return an error if it can't write the string. | ||
fn write_str(&mut self, value: &str) -> io::Result<()>; | ||
|
||
/// It gets the captured output is enabled. | ||
/// It gets the captured output if enabled. | ||
fn get_captured_output(&mut self) -> Option<String>; | ||
|
||
/// It prints the captured output is enabled. | ||
/// It prints the captured output if enabled. | ||
fn print_captured_output(&self); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters