ValueCandidates

Trait ValueCandidates 

Source
pub trait ValueCandidates: Send + Sync {
    // Required method
    fn candidates(&self) -> Vec<CompletionCandidate>;
}
Available on crate feature unstable-dynamic only.
Expand description

User-provided completion candidates for an Arg, see ArgValueCandidates

User-provided completion candidates for an Subcommand, see SubcommandCandidates

This is useful when predefined value hints are not enough.

Required Methods§

Source

fn candidates(&self) -> Vec<CompletionCandidate>

All potential candidates for an argument.

See CompletionCandidate for more information.

Implementors§

Source§

impl<F> ValueCandidates for F
where F: Fn() -> Vec<CompletionCandidate> + Send + Sync,