pub struct CompletionContext {
pub prefix: String,
pub kind: CompletionKind,
pub start: usize,
}Expand description
从 (line, pos) 解析出的补全上下文:当前词的前缀,以及是命令还是路径
Fields§
§prefix: String§kind: CompletionKind§start: usize当前词在 line 中的起始位置(用于 rustyline 的 replace start)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompletionContext
impl RefUnwindSafe for CompletionContext
impl Send for CompletionContext
impl Sync for CompletionContext
impl Unpin for CompletionContext
impl UnsafeUnpin for CompletionContext
impl UnwindSafe for CompletionContext
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