pub struct TerminalDebugSnapshot {
pub id: String,
pub title: String,
pub snapshot: TerminalSnapshot,
pub stable_ids: Vec<String>,
}Expand description
Terminal snapshot plus deterministic cell identities for DevTools inspection.
§Examples
use ailloli_ui_devtools_core::TerminalDebugSnapshot;
fn dimensions(terminal: &TerminalDebugSnapshot) -> (usize, usize) {
(terminal.snapshot.lines.len(), terminal.stable_ids.len())
}Fields§
§id: StringHost-supplied terminal identity embedded in every stable cell ID.
title: StringHuman-readable terminal title.
snapshot: TerminalSnapshotBounded terminal viewport/history snapshot.
stable_ids: Vec<String>Cell IDs in line order, then column order, parallel to all snapshot cells.
Implementations§
Source§impl TerminalDebugSnapshot
Construction from an already captured terminal snapshot.
impl TerminalDebugSnapshot
Construction from an already captured terminal snapshot.
Sourcepub fn from_terminal_snapshot(
id: impl Into<String>,
title: impl Into<String>,
snapshot: TerminalSnapshot,
) -> Self
pub fn from_terminal_snapshot( id: impl Into<String>, title: impl Into<String>, snapshot: TerminalSnapshot, ) -> Self
Builds stable IDs as terminal:ID:line:LINE:cell:COLUMN.
Logical history lines use their global index; visual-only lines use the
visual-N sentinel. No terminal text is embedded in the IDs.
§Examples
use ailloli_ui_devtools_core::TerminalDebugSnapshot;
use ailloli_ui_terminal_core::TerminalSnapshot;
fn wrap(snapshot: TerminalSnapshot) -> TerminalDebugSnapshot {
TerminalDebugSnapshot::from_terminal_snapshot("shell-1", "Shell", snapshot)
}Trait Implementations§
Source§impl Clone for TerminalDebugSnapshot
impl Clone for TerminalDebugSnapshot
Source§fn clone(&self) -> TerminalDebugSnapshot
fn clone(&self) -> TerminalDebugSnapshot
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 TerminalDebugSnapshot
impl Debug for TerminalDebugSnapshot
Source§impl<'de> Deserialize<'de> for TerminalDebugSnapshot
impl<'de> Deserialize<'de> for TerminalDebugSnapshot
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 TerminalDebugSnapshot
impl PartialEq for TerminalDebugSnapshot
Source§impl Serialize for TerminalDebugSnapshot
impl Serialize for TerminalDebugSnapshot
impl Eq for TerminalDebugSnapshot
impl StructuralPartialEq for TerminalDebugSnapshot
Auto Trait Implementations§
impl Freeze for TerminalDebugSnapshot
impl RefUnwindSafe for TerminalDebugSnapshot
impl Send for TerminalDebugSnapshot
impl Sync for TerminalDebugSnapshot
impl Unpin for TerminalDebugSnapshot
impl UnwindSafe for TerminalDebugSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.