Struct modalkit::editing::completion::CompletionList
source · pub struct CompletionList {
pub prefix: String,
pub candidates: Arc<Vec<String>>,
pub selected: Option<usize>,
pub display: CompletionDisplay,
pub cursor: Cursor,
pub start: Cursor,
}
Expand description
List of text completion candidates to show to the user.
Fields§
§prefix: String
The original prefix being completed.
candidates: Arc<Vec<String>>
Candidates for text completion.
selected: Option<usize>
Currently selected index in candidates
.
display: CompletionDisplay
How to display the list of candidates.
cursor: Cursor
The cursor’s current position after the word.
start: Cursor
The start of the text being completed.
Implementations§
source§impl CompletionList
impl CompletionList
sourcepub fn select(&mut self, selection: &CompletionSelection) -> Option<String>
pub fn select(&mut self, selection: &CompletionSelection) -> Option<String>
Select a different candidate from the completion list.
Trait Implementations§
source§impl Adjustable for CompletionList
impl Adjustable for CompletionList
source§fn adjust(&mut self, adjs: &[CursorAdjustment])
fn adjust(&mut self, adjs: &[CursorAdjustment])
Apply a CursorAdjustment to any applicable cursors.
source§impl Clone for CompletionList
impl Clone for CompletionList
source§fn clone(&self) -> CompletionList
fn clone(&self) -> CompletionList
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 moreAuto Trait Implementations§
impl Freeze for CompletionList
impl RefUnwindSafe for CompletionList
impl Send for CompletionList
impl Sync for CompletionList
impl Unpin for CompletionList
impl UnwindSafe for CompletionList
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