Between

Trait Between 

Source
pub trait Between: PartialOrd + Sized {
    // Provided methods
    fn is_between(self, start: Self, end: Self) -> bool { ... }
    fn is_not_between(self, start: Self, end: Self) -> bool { ... }
}
Expand description

A trait for checking if a value is between two other values.

Provided Methods§

Source

fn is_between(self, start: Self, end: Self) -> bool

Returns true if self lies between start and end.

Source

fn is_not_between(self, start: Self, end: Self) -> bool

Returns true if self lies beyond start and end.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F: Float> Between for F