pub struct StdoutLinePrinter {}Expand description
Represents a line printer for targetting stdout
Implementations§
Source§impl StdoutLinePrinter
impl StdoutLinePrinter
Sourcepub fn new() -> StdoutLinePrinter
pub fn new() -> StdoutLinePrinter
Trait Implementations§
Source§impl Default for StdoutLinePrinter
impl Default for StdoutLinePrinter
Source§impl LinePrinter for StdoutLinePrinter
impl LinePrinter for StdoutLinePrinter
Source§fn print_line(&mut self, line: &str) -> Result<(), Error>
fn print_line(&mut self, line: &str) -> Result<(), Error>
Prints the given text to stdout followed by a newline
§Arguments
line- Text to print
§Returns
This function will return an error if the print operation did not succeed
§Examples
use utils::{LinePrinter, StdoutLinePrinter};
let mut print_target = StdoutLinePrinter::new();
print_target.print_line("First line of text");
print_target.print_line("Second line of text");Auto Trait Implementations§
impl Freeze for StdoutLinePrinter
impl RefUnwindSafe for StdoutLinePrinter
impl Send for StdoutLinePrinter
impl Sync for StdoutLinePrinter
impl Unpin for StdoutLinePrinter
impl UnwindSafe for StdoutLinePrinter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more