Struct FilenameCompleter
pub struct FilenameCompleter { /* private fields */ }
A Completer for file and folder names.
Implementations
impl FilenameCompleter
fn new() -> SelfConstructor
fn complete_path(&self, line: &str, pos: usize) -> Result<(usize, Vec<Pair>)>Takes the currently edited
linewith the cursorposition and returns the start position and the completion candidates for the partial path to be completed.fn complete_path_unsorted(&self, line: &str, pos: usize) -> Result<(usize, Vec<Pair>)>Similar to
Self::complete_path, but the returned paths are unsorted.
Trait Implementations
impl Completer for FilenameCompleter
type Candidate = Pair;fn complete(&self, line: &str, pos: usize, _ctx: &Context<'_>) -> Result<(usize, Vec<Pair>)>
impl Default for FilenameCompleter
fn default() -> Self
Auto Trait Implementations
impl Freeze for FilenameCompleter
impl RefUnwindSafe for FilenameCompleter
impl Send for FilenameCompleter
impl Sync for FilenameCompleter
impl Unpin for FilenameCompleter
impl UnsafeUnpin for FilenameCompleter
impl UnwindSafe for FilenameCompleter
Blanket Implementations
impl<T> Any for FilenameCompleter
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FilenameCompleter
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FilenameCompleter
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for FilenameCompleter
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for FilenameCompleter
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FilenameCompleter
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for FilenameCompleter
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>