Trait range_check::Contains [] [src]

pub trait Contains<T> {
    fn contains<TRef: Borrow<T>>(&self, value: TRef) -> bool;
}

A trait for all range-type values.

Required Methods

Returns true if this range contains the given value, false otherwise.

Supports both values and references of the type to check.

Examples

use range_check::Contains;

let range = 3000..5000;
assert!(range.contains(4123));

Implementors