DecrementMut

Trait DecrementMut 

Source
pub trait DecrementMut {
    type Output;

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

DecrementMut is a trait describing the ability to decrement a value in place. It is similar to Decrement, but it allows for mutable access to the value.

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

Required Associated Types§

Required Methods§

Source

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

Implementors§

Source§

impl<S> DecrementMut for S
where S: One, for<'a> &'a S: Sub<S, Output = S>,