Trait Adjacent

Source
pub trait Adjacent {
    // Required methods
    fn valid_first(&self) -> bool;
    fn is_next(&self, previous: &Self) -> bool;
}
Expand description

A trait for types which can be contiguous

Required Methods§

Source

fn valid_first(&self) -> bool

Whether the item is valid as the first in a sequence

Source

fn is_next(&self, previous: &Self) -> bool

Whether the item is immediately following the previous

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 Adjacent for u64

Source§

fn valid_first(&self) -> bool

Source§

fn is_next(&self, previous: &Self) -> bool

Source§

impl Adjacent for NonZero<u8>

Source§

fn valid_first(&self) -> bool

Source§

fn is_next(&self, previous: &Self) -> bool

Implementors§

Source§

impl Adjacent for SeekPoint

Source§

impl Adjacent for CDDAOffset

Source§

impl<O: Adjacent> Adjacent for Index<O>

Source§

impl<const MAX: usize, O: Adjacent, N: Adjacent> Adjacent for Track<O, N, IndexVec<MAX, O>>