Skip to main content

equals_any

Function equals_any 

Source
pub fn equals_any<Candidates>(item: &str, candidates: Candidates) -> bool
where Candidates: IntoIterator, Candidates::Item: AsRef<str>,
Expand description

Reports whether any of candidates equals item.

Unlike a slice’s contains, the candidates need not share the type of item, so a list of String is searched for a &str without allocating.