Expand description
Successor and predecessor functions defined for T,
but as free functions rather than methods on T itself.
This is useful as a workaround for Rust’s “orphan rules”,
which prevent you from implementing StepLite for T if T
is a foreign type.
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.
There is also a blanket implementation of StepFns for all
types implementing StepLite. Consumers of this crate should
prefer to implement StepLite for their own types, and only
fall back to StepFns when dealing with foreign types.
Required methods
Returns the successor of value start.
If this would overflow the range of values supported by Self,
this function is allowed to panic, wrap, or saturate.
The suggested behavior is to panic when debug assertions are enabled,
and to wrap or saturate otherwise.