Trait malachite_base::num::logic::traits::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§