pub struct EditorState {
pub lines: Vec<String>,
pub cursor_line: usize,
pub cursor_col: usize,
}Expand description
Editor lines and a cursor whose column counts UTF-16 code units: what
pi-tui’s autocomplete providers receive and applyCompletion returns.
Fields§
§lines: Vec<String>The lines.
cursor_line: usizeThe cursor’s line.
cursor_col: usizeThe cursor’s column.
Trait Implementations§
Source§impl Clone for EditorState
impl Clone for EditorState
Source§impl Debug for EditorState
impl Debug for EditorState
Source§impl<'de> Deserialize<'de> for EditorState
impl<'de> Deserialize<'de> for EditorState
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
impl Eq for EditorState
Source§impl PartialEq for EditorState
impl PartialEq for EditorState
Source§impl Serialize for EditorState
impl Serialize for EditorState
impl StructuralPartialEq for EditorState
Auto Trait Implementations§
impl Freeze for EditorState
impl RefUnwindSafe for EditorState
impl Send for EditorState
impl Sync for EditorState
impl Unpin for EditorState
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.