Trait post_incr::PostDecr[][src]

pub trait PostDecr {
    fn post_decr(&mut self) -> Self;
}

Required methods

fn post_decr(&mut self) -> Self[src]

x-- in other language.

use post_incr::PostDecr as _;

let mut x: i32 = 0;
assert_eq!(x.post_decr(), 0);
assert_eq!(x.post_decr(), -1);
assert_eq!(x.post_decr(), -2);

Implementors

impl<T> PostDecr for T where
    Self: Copy + SubAssign + One
[src]

fn post_decr(&mut self) -> Self[src]