Function suggestions::provide_suggestions
source · [−]pub fn provide_suggestions<I, T>(
target: &str,
possible_values: I
) -> Vec<String> where
T: AsRef<str>,
I: IntoIterator<Item = T>,
Expand description
Suggest strings that are similar to target
,
but are actually present in the possible_values
.
Returns an empty vector vec![]
if there is nothing reasonbly similar.
The implementation sorts suggestions based on its internal notion of similarity (from best -> worst).
See also provide_a_suggestion, which only picks a single suggesetion.