RangeExt

Trait RangeExt 

Source
pub trait RangeExt {
    type Idx;

    // Required methods
    fn mv(&self, l: Self::Idx, r: Self::Idx) -> Self;
    fn shift(&self, a: Self::Idx) -> Self;
    fn expand(&self, a: Self::Idx) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn mv(&self, l: Self::Idx, r: Self::Idx) -> Self

Source

fn shift(&self, a: Self::Idx) -> Self

Source

fn expand(&self, a: Self::Idx) -> Self

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<Idx> RangeExt for Range<Idx>
where Idx: Copy + Add<Output = Idx> + Sub<Output = Idx> + Neg<Output = Idx>,

Source§

type Idx = Idx

Source§

fn mv(&self, l: Self::Idx, r: Self::Idx) -> Self

Source§

fn shift(&self, a: Idx) -> Self

Source§

fn expand(&self, a: Self::Idx) -> Self

Source§

impl<Idx> RangeExt for RangeInclusive<Idx>
where Idx: Copy + Add<Output = Idx> + Sub<Output = Idx> + Neg<Output = Idx>,

Source§

type Idx = Idx

Source§

fn mv(&self, l: Self::Idx, r: Self::Idx) -> Self

Source§

fn shift(&self, a: Idx) -> Self

Source§

fn expand(&self, a: Self::Idx) -> Self

Implementors§