1.0.0[−][src]Trait nom::lib::std::ops::Not
The unary logical negation operator !
.
Examples
An implementation of Not
for Answer
, which enables the use of !
to
invert its value.
use std::ops::Not; #[derive(Debug, PartialEq)] enum Answer { Yes, No, } impl Not for Answer { type Output = Answer; fn not(self) -> Answer { match self { Answer::Yes => Answer::No, Answer::No => Answer::Yes } } } assert_eq!(!Answer::Yes, Answer::No); assert_eq!(!Answer::No, Answer::Yes);
Associated Types
type Output
The resulting type after applying the !
operator.
Required Methods
Implementations on Foreign Types
impl Not for Wrapping<u128>
[src]
impl Not for Wrapping<u128>
impl<'a> Not for &'a u8
[src]
impl<'a> Not for &'a u8
impl Not for bool
[src]
impl Not for bool
impl Not for u8
[src]
impl Not for u8
impl<'a> Not for &'a usize
[src]
impl<'a> Not for &'a usize
impl Not for i32
[src]
impl Not for i32
impl<'a> Not for &'a Wrapping<u16>
[src]
impl<'a> Not for &'a Wrapping<u16>
impl<'a> Not for &'a Wrapping<i128>
[src]
impl<'a> Not for &'a Wrapping<i128>
impl<'a> Not for &'a Wrapping<usize>
[src]
impl<'a> Not for &'a Wrapping<usize>
type Output = <Wrapping<usize> as Not>::Output
fn not(self) -> <Wrapping<usize> as Not>::Output
[src]
fn not(self) -> <Wrapping<usize> as Not>::Output
impl Not for i128
[src]
impl Not for i128
impl Not for u32
[src]
impl Not for u32
impl Not for Wrapping<u8>
[src]
impl Not for Wrapping<u8>
impl Not for Wrapping<i128>
[src]
impl Not for Wrapping<i128>
impl Not for Wrapping<u64>
[src]
impl Not for Wrapping<u64>
impl<'a> Not for &'a u128
[src]
impl<'a> Not for &'a u128
impl Not for Wrapping<i8>
[src]
impl Not for Wrapping<i8>
impl<'a> Not for &'a Wrapping<i64>
[src]
impl<'a> Not for &'a Wrapping<i64>
impl<'a> Not for &'a Wrapping<u128>
[src]
impl<'a> Not for &'a Wrapping<u128>
impl<'a> Not for &'a Wrapping<isize>
[src]
impl<'a> Not for &'a Wrapping<isize>
type Output = <Wrapping<isize> as Not>::Output
fn not(self) -> <Wrapping<isize> as Not>::Output
[src]
fn not(self) -> <Wrapping<isize> as Not>::Output
impl Not for Wrapping<u32>
[src]
impl Not for Wrapping<u32>
impl Not for u16
[src]
impl Not for u16
impl<'a> Not for &'a bool
[src]
impl<'a> Not for &'a bool
impl<'a> Not for &'a Wrapping<u64>
[src]
impl<'a> Not for &'a Wrapping<u64>
impl<'a> Not for &'a isize
[src]
impl<'a> Not for &'a isize
impl<'a> Not for &'a Wrapping<i32>
[src]
impl<'a> Not for &'a Wrapping<i32>
impl<'a> Not for &'a Wrapping<u32>
[src]
impl<'a> Not for &'a Wrapping<u32>
impl Not for Wrapping<i64>
[src]
impl Not for Wrapping<i64>
impl Not for Wrapping<u16>
[src]
impl Not for Wrapping<u16>
impl<'a> Not for &'a u64
[src]
impl<'a> Not for &'a u64
impl Not for u128
[src]
impl Not for u128
impl Not for u64
[src]
impl Not for u64
impl Not for i16
[src]
impl Not for i16
impl Not for Wrapping<i32>
[src]
impl Not for Wrapping<i32>
impl Not for i8
[src]
impl Not for i8
impl Not for usize
[src]
impl Not for usize
impl Not for Wrapping<usize>
[src]
impl Not for Wrapping<usize>
impl<'a> Not for &'a u32
[src]
impl<'a> Not for &'a u32
impl<'a> Not for &'a Wrapping<i16>
[src]
impl<'a> Not for &'a Wrapping<i16>
impl<'a> Not for &'a Wrapping<i8>
[src]
impl<'a> Not for &'a Wrapping<i8>
impl Not for Wrapping<isize>
[src]
impl Not for Wrapping<isize>
impl<'a> Not for &'a u16
[src]
impl<'a> Not for &'a u16
impl<'a> Not for &'a i8
[src]
impl<'a> Not for &'a i8
impl Not for Wrapping<i16>
[src]
impl Not for Wrapping<i16>
impl Not for isize
[src]
impl Not for isize
impl<'a> Not for &'a i128
[src]
impl<'a> Not for &'a i128
impl<'a> Not for &'a Wrapping<u8>
[src]
impl<'a> Not for &'a Wrapping<u8>
impl<'a> Not for &'a i64
[src]
impl<'a> Not for &'a i64
impl<'a> Not for &'a i16
[src]
impl<'a> Not for &'a i16
impl Not for i64
[src]
impl Not for i64
impl<'a> Not for &'a i32
[src]
impl<'a> Not for &'a i32