Trait OrdAdjacency

Source
pub trait OrdAdjacency {
    // Required method
    fn are_adjacent(self, rhs: Self) -> bool;
}
Expand description

Allows a two values to be tested for adjacency.

Required Methods§

Source

fn are_adjacent(self, rhs: Self) -> bool

Returns true if self is adjacent on either side of rhs.

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.

Implementations on Foreign Types§

Source§

impl OrdAdjacency for u16

Source§

fn are_adjacent(self, rhs: u16) -> bool

Source§

impl OrdAdjacency for u32

Source§

fn are_adjacent(self, rhs: u32) -> bool

Source§

impl OrdAdjacency for Fixed

Source§

fn are_adjacent(self, rhs: Fixed) -> bool

Implementors§