pub struct TerminalSnapshotCell {
pub col: usize,
pub text: String,
pub style: TerminalStyle,
pub width: CellWidth,
pub hyperlink: Option<TerminalHyperlinkId>,
}Expand description
One retained, renderable cell in a snapshot line.
§Examples
use ailloli_ui_terminal_core::{TerminalSnapshot, TerminalState};
let mut state = TerminalState::new();
state.write_str("A");
let snapshot = TerminalSnapshot::from_state(&state, Default::default());
let cell = &snapshot.lines[0].cells[0];
assert_eq!((cell.col, cell.text.as_str()), (0, "A"));Fields§
§col: usizeOriginal zero-based physical column before placeholder filtering.
text: StringRedacted grapheme text stored by the source cell.
style: TerminalStyleCopy of the cell’s visual style.
width: CellWidthSingle, wide-leading, or wide-trailing classification.
Snapshot construction filters wide-trailing cells, but public construction/deserialization can still supply that value.
hyperlink: Option<TerminalHyperlinkId>Hyperlink identity, or None; hyperlink target data is not embedded.
Trait Implementations§
Source§impl Clone for TerminalSnapshotCell
impl Clone for TerminalSnapshotCell
Source§fn clone(&self) -> TerminalSnapshotCell
fn clone(&self) -> TerminalSnapshotCell
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 TerminalSnapshotCell
impl Debug for TerminalSnapshotCell
Source§impl<'de> Deserialize<'de> for TerminalSnapshotCell
impl<'de> Deserialize<'de> for TerminalSnapshotCell
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 TerminalSnapshotCell
impl PartialEq for TerminalSnapshotCell
Source§impl Serialize for TerminalSnapshotCell
impl Serialize for TerminalSnapshotCell
impl Eq for TerminalSnapshotCell
impl StructuralPartialEq for TerminalSnapshotCell
Auto Trait Implementations§
impl Freeze for TerminalSnapshotCell
impl RefUnwindSafe for TerminalSnapshotCell
impl Send for TerminalSnapshotCell
impl Sync for TerminalSnapshotCell
impl Unpin for TerminalSnapshotCell
impl UnwindSafe for TerminalSnapshotCell
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