pub struct EditorState {
pub lines: Vec<String>,
pub cursor: BufferPosition,
pub selection_anchor: Option<BufferPosition>,
pub font_size: f32,
}Fields§
§lines: Vec<String>Lines of text in the buffer
cursor: BufferPositionCursor position (row, column in bytes)
selection_anchor: Option<BufferPosition>Selection anchor for text selection
font_size: f32Font size (may be ignored by TUI)
Implementations§
Source§impl EditorState
impl EditorState
Trait Implementations§
Source§impl Clone for EditorState
impl Clone for EditorState
Source§fn clone(&self) -> EditorState
fn clone(&self) -> EditorState
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for EditorState
impl RefUnwindSafe for EditorState
impl Send for EditorState
impl Sync for EditorState
impl Unpin for EditorState
impl UnwindSafe for EditorState
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