[][src]Trait kernel::debug::IoWrite

pub trait IoWrite {
    fn write(&mut self, buf: &[u8]);

    fn write_ring_buffer<'a>(&mut self, buf: &RingBuffer<'a, u8>) { ... }
}

This trait is similar to std::io::Write in that it takes bytes instead of a string (contrary to core::fmt::Write), but io::Write isn't available in no_std (due to std::io::Error not being available).

Also, in our use cases, writes are infaillible, so the write function just doesn't return anything.

See also the tracking issue: https://github.com/rust-lang/rfcs/issues/2262

Required methods

fn write(&mut self, buf: &[u8])

Loading content...

Provided methods

fn write_ring_buffer<'a>(&mut self, buf: &RingBuffer<'a, u8>)

Loading content...

Implementors

impl IoWrite for DebugWriterWrapper[src]

Loading content...