pub struct ConsoleModel {Show 13 fields
pub title: String,
pub lines: Vec<Line>,
pub max_lines: usize,
pub next_id: LineId,
pub prompt: String,
pub input: String,
pub cursor: Cursor,
pub scroll: SmoothScroll,
pub scale: f32,
pub filter: String,
pub selected: Option<LineId>,
pub history: Vec<String>,
pub history_pos: Option<usize>,
}Expand description
The complete observable state (FC-1 / FC-3) of a Console, in one
serializable, round-trippable struct.
Fields§
§title: StringThe deck keys facets off this.
lines: Vec<Line>Scrollback lines, each carrying a stable id (FC-5) + parsed coloured spans.
max_lines: usizeMax scrollback (oldest dropped).
next_id: LineIdThe next stable line id to hand out (monotonic; never reused).
prompt: StringThe shell prompt shown before the input line.
input: StringThe in-progress input (command being typed).
cursor: CursorThe cursor shape.
scroll: SmoothScrollSmooth scrollback offset (CygnusEd engine; deterministic via Tick).
scale: f32Render scale.
filter: StringFree-text find filter (searchable).
selected: Option<LineId>The selected scrollback line, keyed on its stable id (FC-5).
history: Vec<String>Submitted-command history (oldest → newest).
history_pos: Option<usize>The recall cursor into history: None = editing a fresh
draft; Some(i) = showing history[i].
Trait Implementations§
Source§impl Clone for ConsoleModel
impl Clone for ConsoleModel
Source§fn clone(&self) -> ConsoleModel
fn clone(&self) -> ConsoleModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsoleModel
impl Debug for ConsoleModel
Source§impl<'de> Deserialize<'de> for ConsoleModel
impl<'de> Deserialize<'de> for ConsoleModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConsoleModel
impl PartialEq for ConsoleModel
Source§impl Serialize for ConsoleModel
impl Serialize for ConsoleModel
impl StructuralPartialEq for ConsoleModel
Auto Trait Implementations§
impl Freeze for ConsoleModel
impl RefUnwindSafe for ConsoleModel
impl Send for ConsoleModel
impl Sync for ConsoleModel
impl Unpin for ConsoleModel
impl UnsafeUnpin for ConsoleModel
impl UnwindSafe for ConsoleModel
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more