IncrementMut

Trait IncrementMut 

Source
pub trait IncrementMut {
    type Output;

    // Required method
    fn inc_mut(&mut self) -> Self::Output;
}
Expand description

IncrementMut is similar to Increment, but it allows for incrementing a value in place.

note: the automatic implementation of IncrementMut leverages the replace method to compute the next value, replacing and returning the previous value.

Required Associated Types§

Required Methods§

Source

fn inc_mut(&mut self) -> Self::Output

Implementors§

Source§

impl<S> IncrementMut for S
where S: One, for<'a> &'a S: Add<S, Output = S>,