Function suggestions::provide_a_suggestion
source · [−]pub fn provide_a_suggestion<I, T>(
target: &str,
possible_values: I
) -> Option<String> where
T: AsRef<str>,
I: IntoIterator<Item = T>,
Expand description
Suggest a string that most is similar to target
,
but is actually present in the possible_values
.
Returns None
if there is nothing in possible_values
that is reasonably similar.
See also provide_suggestions to consider multiple possible suggestions (recommended).
If there are multiple ,possible