#[non_exhaustive]pub struct ComponentView {
pub lines: Vec<Vec<Segment>>,
pub cursor: Option<(usize, usize)>,
}Expand description
A rendered view: lines of segments, and where the terminal cursor goes
(a text caret), or None to hide it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lines: Vec<Vec<Segment>>§cursor: Option<(usize, usize)>(row, column) within the view.
Implementations§
Source§impl ComponentView
impl ComponentView
pub fn new(lines: Vec<Vec<Segment>>) -> ComponentView
Sourcepub fn with_cursor(self, row: usize, column: usize) -> ComponentView
pub fn with_cursor(self, row: usize, column: usize) -> ComponentView
Put the cursor at row, column of the view.
Trait Implementations§
Source§impl Clone for ComponentView
impl Clone for ComponentView
Source§impl Debug for ComponentView
impl Debug for ComponentView
Auto Trait Implementations§
impl Freeze for ComponentView
impl RefUnwindSafe for ComponentView
impl Send for ComponentView
impl Sync for ComponentView
impl Unpin for ComponentView
impl UnsafeUnpin for ComponentView
impl UnwindSafe for ComponentView
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