[][src]Struct kernel::debug::DebugWriter

pub struct DebugWriter {
    uart: &'static dyn Transmit<'static>,
    output_buffer: TakeCell<'static, [u8]>,
    internal_buffer: TakeCell<'static, RingBuffer<'static, u8>>,
    count: Cell<usize>,
}

Main type that we need an immutable reference to so we can share it with the UART provider and this debug module.

Fields

uart: &'static dyn Transmit<'static>output_buffer: TakeCell<'static, [u8]>internal_buffer: TakeCell<'static, RingBuffer<'static, u8>>count: Cell<usize>

Methods

impl DebugWriter[src]

pub fn new(
    uart: &'static dyn Transmit,
    out_buffer: &'static mut [u8],
    internal_buffer: &'static mut RingBuffer<'static, u8>
) -> DebugWriter
[src]

fn increment_count(&self)[src]

fn get_count(&self) -> usize[src]

fn publish_str(&self)[src]

Write as many of the bytes from the internal_buffer to the output mechanism as possible.

fn extract(&self) -> Option<&mut RingBuffer<'static, u8>>[src]

Trait Implementations

impl TransmitClient for DebugWriter[src]

Auto Trait Implementations

impl Unpin for DebugWriter

impl !Send for DebugWriter

impl !Sync for DebugWriter

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]