Skip to main content

OutputBuffer

Trait OutputBuffer 

Source
pub trait OutputBuffer {
    // Required methods
    fn available(&self) -> usize;
    fn write_each(
        &mut self,
        callback: &mut OutputBufferCallback<'_>,
    ) -> Result<usize, Errno>;
}
Expand description

The subset of starnix_core’s OutputBuffer that LocklessRingBuffer::read() uses.

Required Methods§

Source

fn available(&self) -> usize

Returns the number of bytes that can still be written.

Source

fn write_each( &mut self, callback: &mut OutputBufferCallback<'_>, ) -> Result<usize, Errno>

Calls callback with each writable segment, and returns the number of bytes written.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§