Trait relp_num::Negateable

source ·
pub trait Negateable: Signed {
    // Required method
    fn negate(&mut self);
}
Expand description

A number that can be negated, that is, who’s sign can be flipped.

Required Methods§

source

fn negate(&mut self)

Negate the number, e.g. go from 1 to -1.

Implementations on Foreign Types§

source§

impl Negateable for i8

source§

fn negate(&mut self)

source§

impl Negateable for i16

source§

fn negate(&mut self)

source§

impl Negateable for i32

source§

fn negate(&mut self)

source§

impl Negateable for i64

source§

fn negate(&mut self)

source§

impl Negateable for i128

source§

fn negate(&mut self)

source§

impl Negateable for isize

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroI8

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroI16

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroI32

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroI64

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroI128

source§

fn negate(&mut self)

source§

impl Negateable for NonZeroIsize

source§

fn negate(&mut self)

Implementors§