ratkit 0.2.15

A comprehensive collection of reusable TUI components for ratatui including resizable splits, tree views, markdown rendering, toast notifications, dialogs, and terminal embedding
Documentation
//! Source line model for code-widget parsing.

/// A raw source line with one-based line metadata.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CodeLine {
    /// One-based source line number.
    pub number: usize,
    /// Raw source text.
    pub text: String,
}

impl CodeLine {
    /// Creates a source line model.
    pub fn new(number: usize, text: impl Into<String>) -> Self {
        Self {
            number,
            text: text.into(),
        }
    }
}