pub trait Output {
    type Io: Write;

    // Required methods
    fn new() -> Self;
    fn write<F: FnOnce(&mut Self::Io) -> Result<()>>(
        &mut self,
        f: F
    ) -> Result<()>;

    // Provided method
    fn log(
        &mut self,
        id: u64,
        scope: &[(u64, usize)],
        verbose: bool,
        now: Timestamp,
        v: impl Display
    ) { ... }
}

Required Associated Types§

Required Methods§

source

fn new() -> Self

source

fn write<F: FnOnce(&mut Self::Io) -> Result<()>>(&mut self, f: F) -> Result<()>

Provided Methods§

source

fn log( &mut self, id: u64, scope: &[(u64, usize)], verbose: bool, now: Timestamp, v: impl Display )

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Output for BufWriter<Stdout>

§

type Io = BufWriter<Stdout>

source§

fn new() -> Self

source§

fn write<F: FnOnce(&mut Self::Io) -> Result<()>>(&mut self, f: F) -> Result<()>

source§

impl Output for Cursor<Vec<u8>>

§

type Io = Cursor<Vec<u8>>

source§

fn new() -> Self

source§

fn write<F: FnOnce(&mut Self::Io) -> Result<()>>(&mut self, f: F) -> Result<()>

Implementors§