pub struct TerminalSnapshotCursor {
pub row: usize,
pub col: usize,
pub visible: bool,
pub shape: TerminalCursorShape,
pub global_line: Option<u64>,
}Expand description
Snapshot cursor position and presentation.
§Examples
use ailloli_ui_terminal_core::{TerminalSnapshot, TerminalSnapshotConfig, TerminalState};
let snapshot = TerminalSnapshot::from_state(&TerminalState::new(), Default::default());
assert_eq!((snapshot.cursor.row, snapshot.cursor.col), (0, 0));
assert_eq!(snapshot.cursor.global_line, Some(0));Fields§
§row: usizeZero-based row within the active screen.
col: usizeZero-based column within the active screen.
visible: boolWhether renderers should display the cursor.
shape: TerminalCursorShapeRequested cursor shape.
global_line: Option<u64>Saturating normal-screen global line, or None on the alternate screen.
Trait Implementations§
Source§impl Clone for TerminalSnapshotCursor
impl Clone for TerminalSnapshotCursor
Source§fn clone(&self) -> TerminalSnapshotCursor
fn clone(&self) -> TerminalSnapshotCursor
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 TerminalSnapshotCursor
impl Debug for TerminalSnapshotCursor
Source§impl<'de> Deserialize<'de> for TerminalSnapshotCursor
impl<'de> Deserialize<'de> for TerminalSnapshotCursor
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 TerminalSnapshotCursor
impl PartialEq for TerminalSnapshotCursor
Source§impl Serialize for TerminalSnapshotCursor
impl Serialize for TerminalSnapshotCursor
impl Eq for TerminalSnapshotCursor
impl StructuralPartialEq for TerminalSnapshotCursor
Auto Trait Implementations§
impl Freeze for TerminalSnapshotCursor
impl RefUnwindSafe for TerminalSnapshotCursor
impl Send for TerminalSnapshotCursor
impl Sync for TerminalSnapshotCursor
impl Unpin for TerminalSnapshotCursor
impl UnwindSafe for TerminalSnapshotCursor
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