appcui 0.4.13

A feature-rich and cross-platform TUI/CUI framework for Rust, enabling modern terminal-based applications on Windows, Linux, and macOS. Includes built-in UI components like buttons, menus, list views, tree views, checkboxes, and more. Perfect for building fast and interactive CLI tools and text-based interfaces.
Documentation
pub(crate) struct OutputBuffer {
    buffer: [u8; 31],
    len: u8,
}
impl OutputBuffer {
    pub(crate) fn new() -> Self {
        Self { buffer: [0; 31], len: 0 }
    }
    #[inline(always)]
    pub(crate) fn set(&mut self, index: usize, value: u8) {
        self.buffer[index] = value;
    }
    #[inline(always)]
    pub(crate) fn set_len(&mut self, len: u8) {
        self.len = len;
    }
    #[inline(always)]
    pub(crate) fn as_slice(&self) -> &[u8] {
        &self.buffer[..self.len as usize]
    }
}