Skip to main content

UsizeExt

Trait UsizeExt 

Source
pub trait UsizeExt {
    // Required methods
    fn ssub(&mut self, _: usize) -> bool;
    fn wsub(&mut self, _: usize, _: usize) -> bool;
}

Required Methods§

Source

fn ssub(&mut self, _: usize) -> bool

Saturating subtract with lower bound 0.

Source

fn wsub(&mut self, _: usize, _: usize) -> bool

Wrap subtract with wrap around at cap.

Implementations on Foreign Types§

Source§

impl UsizeExt for usize

Source§

fn ssub(&mut self, rhs: usize) -> bool

Source§

fn wsub(&mut self, rhs: usize, cap: usize) -> bool

Implementors§