pub trait NotAssign {
fn not_assign(&mut self);
}
Expand description
Replaces a number with its bitwise negation.
Required Methods
fn not_assign(&mut self)
Implementations on Foreign Types
sourceimpl NotAssign for bool
impl NotAssign for bool
sourcefn not_assign(&mut self)
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);
sourceimpl NotAssign for u8
impl NotAssign for u8
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for u16
impl NotAssign for u16
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for u32
impl NotAssign for u32
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for u64
impl NotAssign for u64
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for u128
impl NotAssign for u128
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for usize
impl NotAssign for usize
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for i8
impl NotAssign for i8
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for i16
impl NotAssign for i16
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for i32
impl NotAssign for i32
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for i64
impl NotAssign for i64
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for i128
impl NotAssign for i128
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl NotAssign for isize
impl NotAssign for isize
sourcefn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.