Trait rangemap::StepLite[][src]

pub trait StepLite {
    fn add_one(&self) -> Self;
fn sub_one(&self) -> Self; }

Minimal version of unstable Step trait from the Rust standard library.

This is needed for RangeInclusiveMap because ranges stored as its keys interact with each other when the start of one is adjacent the end of another. I.e. we need a concept of successor values rather than just equality, and that is what Step will eventually provide once it is stabilized.

NOTE: This will likely be deprecated and then eventually removed once the standard library's Step trait is stabilised, as most crates will then likely implement Step for their types where appropriate.

See this issue for details about that stabilization process.

Required methods

fn add_one(&self) -> Self[src]

Returns the successor of self.

fn sub_one(&self) -> Self[src]

Returns the predecessor of self.

Loading content...

Implementations on Foreign Types

impl StepLite for usize[src]

impl StepLite for u8[src]

impl StepLite for u16[src]

impl StepLite for u32[src]

impl StepLite for u64[src]

impl StepLite for u128[src]

impl StepLite for i8[src]

impl StepLite for i16[src]

impl StepLite for i32[src]

impl StepLite for i64[src]

impl StepLite for i128[src]

Loading content...

Implementors

Loading content...