pub trait Matches<T> {
// Required method
fn matches(self, compare_val: Value) -> T;
}Required Methods§
Sourcefn matches(self, compare_val: Value) -> T
fn matches(self, compare_val: Value) -> T
Returns an array complimenting the original where each value is true or false depending on whether it is == to the compared value.
Admittedly, this is most often going to be used in
count(array::matches($arr, $val)) to count the number of times an
element appears in an array but it’s nice to have this in addition.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".