pub struct PathCompleter { /* private fields */ }Available on crate feature
unstable-dynamic only.Expand description
Complete a value as a std::path::Path
§Example
use clap::Parser;
use clap_complete::engine::{ArgValueCompleter, PathCompleter};
#[derive(Debug, Parser)]
struct Cli {
#[arg(long, add = ArgValueCompleter::new(PathCompleter::file()))]
custom: Option<String>,
}Implementations§
Source§impl PathCompleter
impl PathCompleter
Trait Implementations§
Source§impl Default for PathCompleter
impl Default for PathCompleter
Source§impl ValueCompleter for PathCompleter
impl ValueCompleter for PathCompleter
Source§fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate>
fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate>
All potential candidates for an argument. Read more
Source§fn complete_at(
&self,
arg_index: usize,
current: &OsStr,
) -> Vec<CompletionCandidate>
fn complete_at( &self, arg_index: usize, current: &OsStr, ) -> Vec<CompletionCandidate>
All potential candidates for the value at
arg_index within the current occurrence. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PathCompleter
impl !UnwindSafe for PathCompleter
impl Freeze for PathCompleter
impl Send for PathCompleter
impl Sync for PathCompleter
impl Unpin for PathCompleter
impl UnsafeUnpin for PathCompleter
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