pub trait Contains<I> {
    // Required method
    fn contains(&self, item: I) -> bool;
}
Expand description

Types for values that contain items.

At present, these are:

typecontains
&str, String&str, char, &[char] F: FnMut(char) -> bool
Vec<T>T, &T
Option<T>I where T: Contains<I>
form::Result<'_, T>I where T: Contains<I>

Required Methods§

source

fn contains(&self, item: I) -> bool

Returns true if self contains item.

Implementations on Foreign Types§

source§

impl<I, T: Contains<I>> Contains<I> for Option<T>

source§

fn contains(&self, item: I) -> bool

source§

impl<T: PartialEq> Contains<&T> for Vec<T>

source§

fn contains(&self, item: &T) -> bool

source§

impl<T: PartialEq> Contains<T> for Vec<T>

source§

fn contains(&self, item: T) -> bool

source§

impl<I, T: Contains<I> + ?Sized> Contains<I> for &T

source§

fn contains(&self, item: I) -> bool

source§

impl Contains<&str> for String

source§

fn contains(&self, item: &str) -> bool

source§

impl Contains<&[char]> for String

source§

fn contains(&self, item: &[char]) -> bool

source§

impl Contains<&[char]> for str

source§

fn contains(&self, item: &[char]) -> bool

source§

impl Contains<&str> for str

source§

fn contains(&self, item: &str) -> bool

source§

impl<const N: usize> Contains<&[char; N]> for String

source§

fn contains(&self, item: &[char; N]) -> bool

source§

impl<F: FnMut(char) -> bool> Contains<F> for str

source§

fn contains(&self, f: F) -> bool

source§

impl Contains<char> for String

source§

fn contains(&self, item: char) -> bool

source§

impl<F: FnMut(char) -> bool> Contains<F> for String

source§

fn contains(&self, f: F) -> bool

source§

impl<const N: usize> Contains<&[char; N]> for str

source§

fn contains(&self, item: &[char; N]) -> bool

source§

impl Contains<char> for str

source§

fn contains(&self, item: char) -> bool

Implementors§

source§

impl<I, T: Contains<I>> Contains<I> for Result<'_, T>