Trait NotAssign

Source
pub trait NotAssign {
    // Required method
    fn not_assign(&mut self);
}
Expand description

Replaces a number with its bitwise negation.

Required Methods§

Source

fn not_assign(&mut self)

Implementations on Foreign Types§

Source§

impl NotAssign for bool

Source§

fn not_assign(&mut self)

Replaces a bool by its opposite.

$b \gets \lnot b$.

§Worst-case complexity

Constant time and additional memory.

§Examples
use malachite_base::num::logic::traits::NotAssign;

let mut b = false;
b.not_assign();
assert_eq!(b, true);

let mut b = true;
b.not_assign();
assert_eq!(b, false);
Source§

impl NotAssign for i8

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for i16

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for i32

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for i64

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for i128

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for isize

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for u8

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for u16

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for u32

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for u64

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for u128

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl NotAssign for usize

Source§

fn not_assign(&mut self)

Replaces a number with its bitwise negation.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§