[−][src]Trait rangemap::StepLite
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
Returns the successor of self
.
fn sub_one(&self) -> Self
Returns the predecessor of self
.