Printer

Trait Printer 

Source
pub trait Printer {
    type W: Write;
    type M: InterruptModer;

    // Required method
    fn destination(&mut self) -> &mut Self::W;

    // Provided methods
    fn print(&mut self, args: Arguments<'_>) { ... }
    fn println(&mut self, args: Arguments<'_>) { ... }
}
Expand description

Generic Printer trait

Required Associated Types§

Source

type W: Write

Writer type

Source

type M: InterruptModer

Interrupt type

Required Methods§

Source

fn destination(&mut self) -> &mut Self::W

Returns destination writer.

Used by print and println default impls

Provided Methods§

Source

fn print(&mut self, args: Arguments<'_>)

Prints formatted output to destination

Source

fn println(&mut self, args: Arguments<'_>)

Prints formatted output to destination with newline

Implementors§