rocketsplash-formats 0.2.2

Shared data types and serialization formats for Rocketsplash TUI animations
Documentation
// <FILE>crates/rocketsplash-formats/src/cell.rs</FILE>
// <DESC>Serialized cell representation for splash screens</DESC>
// <VERS>VERSION: 1.0.0</VERS>
// <WCTX>Runtime library implementation</WCTX>
// <CLOG>Define Cell type for splash storage</CLOG>

use serde::{Deserialize, Serialize};

use crate::{CellStyle, Rgb};

/// A single terminal cell with styling and colors.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Cell {
    pub ch: char,
    pub fg: Option<Rgb>,
    pub bg: Option<Rgb>,
    pub style: CellStyle,
}

impl Default for Cell {
    fn default() -> Self {
        Self {
            ch: ' ',
            fg: None,
            bg: None,
            style: CellStyle::empty(),
        }
    }
}

// <FILE>crates/rocketsplash-formats/src/cell.rs</FILE>
// <VERS>END OF VERSION: 1.0.0</VERS>