Trait nom::lib::std::iter::Step [−][src]
pub trait Step: PartialOrd<Self> + Clone { fn steps_between(start: &Self, end: &Self) -> Option<usize>; fn replace_one(&mut self) -> Self; fn replace_zero(&mut self) -> Self; fn add_one(&self) -> Self; fn sub_one(&self) -> Self; fn add_usize(&self, n: usize) -> Option<Self>; }
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Objects that can be stepped over in both directions.
The steps_between
function provides a way to efficiently compare
two Step
objects.
Required Methods
fn steps_between(start: &Self, end: &Self) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Returns the number of steps between two step objects. The count is
inclusive of start
and exclusive of end
.
Returns None
if it is not possible to calculate steps_between
without overflow.
fn replace_one(&mut self) -> Self
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Replaces this step with 1
, returning itself
fn replace_zero(&mut self) -> Self
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Replaces this step with 0
, returning itself
fn add_one(&self) -> Self
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Adds one to this step, returning the result
fn sub_one(&self) -> Self
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Subtracts one to this step, returning the result
fn add_usize(&self, n: usize) -> Option<Self>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
Add an usize, returning None on overflow
Implementations on Foreign Types
impl Step for i64
[src]
impl Step for i64
fn steps_between(start: &i64, end: &i64) -> Option<usize>
[src]
fn steps_between(start: &i64, end: &i64) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<i64>
[src]
fn add_usize(&self, n: usize) -> Option<i64>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> i64
[src]
fn replace_one(&mut self) -> i64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> i64
[src]
fn replace_zero(&mut self) -> i64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> i64
[src]
fn add_one(&self) -> i64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> i64
[src]
fn sub_one(&self) -> i64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for u8
[src]
impl Step for u8
fn steps_between(start: &u8, end: &u8) -> Option<usize>
[src]
fn steps_between(start: &u8, end: &u8) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<u8>
[src]
fn add_usize(&self, n: usize) -> Option<u8>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> u8
[src]
fn replace_one(&mut self) -> u8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> u8
[src]
fn replace_zero(&mut self) -> u8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> u8
[src]
fn add_one(&self) -> u8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> u8
[src]
fn sub_one(&self) -> u8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for i32
[src]
impl Step for i32
fn steps_between(start: &i32, end: &i32) -> Option<usize>
[src]
fn steps_between(start: &i32, end: &i32) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<i32>
[src]
fn add_usize(&self, n: usize) -> Option<i32>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> i32
[src]
fn replace_one(&mut self) -> i32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> i32
[src]
fn replace_zero(&mut self) -> i32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> i32
[src]
fn add_one(&self) -> i32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> i32
[src]
fn sub_one(&self) -> i32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for u64
[src]
impl Step for u64
fn steps_between(start: &u64, end: &u64) -> Option<usize>
[src]
fn steps_between(start: &u64, end: &u64) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<u64>
[src]
fn add_usize(&self, n: usize) -> Option<u64>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> u64
[src]
fn replace_one(&mut self) -> u64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> u64
[src]
fn replace_zero(&mut self) -> u64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> u64
[src]
fn add_one(&self) -> u64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> u64
[src]
fn sub_one(&self) -> u64
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for u128
[src]
impl Step for u128
fn steps_between(_start: &u128, _end: &u128) -> Option<usize>
[src]
fn steps_between(_start: &u128, _end: &u128) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<u128>
[src]
fn add_usize(&self, n: usize) -> Option<u128>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> u128
[src]
fn replace_one(&mut self) -> u128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> u128
[src]
fn replace_zero(&mut self) -> u128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> u128
[src]
fn add_one(&self) -> u128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> u128
[src]
fn sub_one(&self) -> u128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for i16
[src]
impl Step for i16
fn steps_between(start: &i16, end: &i16) -> Option<usize>
[src]
fn steps_between(start: &i16, end: &i16) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<i16>
[src]
fn add_usize(&self, n: usize) -> Option<i16>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> i16
[src]
fn replace_one(&mut self) -> i16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> i16
[src]
fn replace_zero(&mut self) -> i16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> i16
[src]
fn add_one(&self) -> i16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> i16
[src]
fn sub_one(&self) -> i16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for u32
[src]
impl Step for u32
fn steps_between(start: &u32, end: &u32) -> Option<usize>
[src]
fn steps_between(start: &u32, end: &u32) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<u32>
[src]
fn add_usize(&self, n: usize) -> Option<u32>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> u32
[src]
fn replace_one(&mut self) -> u32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> u32
[src]
fn replace_zero(&mut self) -> u32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> u32
[src]
fn add_one(&self) -> u32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> u32
[src]
fn sub_one(&self) -> u32
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for i8
[src]
impl Step for i8
fn steps_between(start: &i8, end: &i8) -> Option<usize>
[src]
fn steps_between(start: &i8, end: &i8) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<i8>
[src]
fn add_usize(&self, n: usize) -> Option<i8>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> i8
[src]
fn replace_one(&mut self) -> i8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> i8
[src]
fn replace_zero(&mut self) -> i8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> i8
[src]
fn add_one(&self) -> i8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> i8
[src]
fn sub_one(&self) -> i8
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for u16
[src]
impl Step for u16
fn steps_between(start: &u16, end: &u16) -> Option<usize>
[src]
fn steps_between(start: &u16, end: &u16) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<u16>
[src]
fn add_usize(&self, n: usize) -> Option<u16>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> u16
[src]
fn replace_one(&mut self) -> u16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> u16
[src]
fn replace_zero(&mut self) -> u16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> u16
[src]
fn add_one(&self) -> u16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> u16
[src]
fn sub_one(&self) -> u16
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for i128
[src]
impl Step for i128
fn steps_between(_start: &i128, _end: &i128) -> Option<usize>
[src]
fn steps_between(_start: &i128, _end: &i128) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<i128>
[src]
fn add_usize(&self, n: usize) -> Option<i128>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> i128
[src]
fn replace_one(&mut self) -> i128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> i128
[src]
fn replace_zero(&mut self) -> i128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> i128
[src]
fn add_one(&self) -> i128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> i128
[src]
fn sub_one(&self) -> i128
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for isize
[src]
impl Step for isize
fn steps_between(start: &isize, end: &isize) -> Option<usize>
[src]
fn steps_between(start: &isize, end: &isize) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<isize>
[src]
fn add_usize(&self, n: usize) -> Option<isize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> isize
[src]
fn replace_one(&mut self) -> isize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> isize
[src]
fn replace_zero(&mut self) -> isize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> isize
[src]
fn add_one(&self) -> isize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> isize
[src]
fn sub_one(&self) -> isize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
impl Step for usize
[src]
impl Step for usize
fn steps_between(start: &usize, end: &usize) -> Option<usize>
[src]
fn steps_between(start: &usize, end: &usize) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_usize(&self, n: usize) -> Option<usize>
[src]
fn add_usize(&self, n: usize) -> Option<usize>
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_one(&mut self) -> usize
[src]
fn replace_one(&mut self) -> usize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn replace_zero(&mut self) -> usize
[src]
fn replace_zero(&mut self) -> usize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn add_one(&self) -> usize
[src]
fn add_one(&self) -> usize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits
fn sub_one(&self) -> usize
[src]
fn sub_one(&self) -> usize
🔬 This is a nightly-only experimental API. (step_trait
)
likely to be replaced by finer-grained traits