Skip to main content

Contains

Trait Contains 

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

Tests whether a primitive contains another value.

Required Methods§

Source

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

Returns true when other is contained within self.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§