pub struct TerminalSnapshotLine {
pub visual_index: usize,
pub global_index: Option<u64>,
pub from_scrollback: bool,
pub text: String,
pub cells: Vec<TerminalSnapshotCell>,
pub truncated: bool,
}Expand description
One captured terminal line.
text represents the full plain line subject only to the text policy, while
cells is independently bounded. Wide-character trailing placeholders are
excluded from cells; each retained cell’s col remains its original
physical column.
§Examples
use ailloli_ui_terminal_core::{TerminalSnapshot, TerminalSnapshotConfig, TerminalState};
let snapshot = TerminalSnapshot::from_state(&TerminalState::new(), Default::default());
let first = &snapshot.lines[0];
assert_eq!(first.visual_index, 0);
assert!(!first.from_scrollback);Fields§
§visual_index: usizeZero-based position in the full pre-limit visual line sequence.
global_index: Option<u64>Normal-screen global line, or None for alternate-screen lines.
from_scrollback: boolWhether this line came from normal-screen scrollback.
text: StringRedacted full plain text, independent of the cell limit.
cells: Vec<TerminalSnapshotCell>Bounded non-wide-trailing cells in physical-column order.
truncated: boolWhether the raw line cell count exceeds max_cells_per_line.
This comparison includes filtered wide-trailing placeholders, so true
does not necessarily mean a visible cell was omitted.
Trait Implementations§
Source§impl Clone for TerminalSnapshotLine
impl Clone for TerminalSnapshotLine
Source§fn clone(&self) -> TerminalSnapshotLine
fn clone(&self) -> TerminalSnapshotLine
Returns a copy of the value. Read more
1.0.0 · 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 TerminalSnapshotLine
impl Debug for TerminalSnapshotLine
Source§impl<'de> Deserialize<'de> for TerminalSnapshotLine
impl<'de> Deserialize<'de> for TerminalSnapshotLine
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 TerminalSnapshotLine
impl PartialEq for TerminalSnapshotLine
Source§impl Serialize for TerminalSnapshotLine
impl Serialize for TerminalSnapshotLine
impl Eq for TerminalSnapshotLine
impl StructuralPartialEq for TerminalSnapshotLine
Auto Trait Implementations§
impl Freeze for TerminalSnapshotLine
impl RefUnwindSafe for TerminalSnapshotLine
impl Send for TerminalSnapshotLine
impl Sync for TerminalSnapshotLine
impl Unpin for TerminalSnapshotLine
impl UnwindSafe for TerminalSnapshotLine
Blanket Implementations§
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