RangeOffset

Trait RangeOffset 

Source
pub trait RangeOffset<Idx: Clone + Add<Output = Idx>> {
    // Required method
    fn offset(&self, _: Idx) -> Self;
}
Expand description

This is an extension trait for the following impl:

#[extension(pub trait RangeOffset)]
impl< Idx : Clone + Add < Output = Idx > > for RangeInclusive < Idx >

Required Methods§

Source

fn offset(&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: Clone + Add<Output = Idx>> RangeOffset<Idx> for Range<Idx>

Source§

fn offset(&self, rhs: Idx) -> Self

Source§

impl<Idx: Clone + Add<Output = Idx>> RangeOffset<Idx> for RangeInclusive<Idx>

Source§

fn offset(&self, rhs: Idx) -> Self

Implementors§