Function contains

Source
pub fn contains<T: PartialEq>(a: &[T], needle: &T) -> bool
Expand description

contains(genericArrayIn, genericValue) – specialized to strings & ints for now. For a more dynamic approach we’d pass Vec<Value> and a Value. We implement a generic helper where T: PartialEq.