Trait gclient::ext::sp_core::sp_std::ops::Not

1.0.0 · source ·
pub trait Not {
    type Output;

    // Required method
    fn not(self) -> Self::Output;
}
Expand description

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 = Self;

    fn not(self) -> Self::Output {
        match self {
            Answer::Yes => Answer::No,
            Answer::No => Answer::Yes
        }
    }
}

assert_eq!(!Answer::Yes, Answer::No);
assert_eq!(!Answer::No, Answer::Yes);

Required Associated Types§

1.0.0 · source

type Output

The resulting type after applying the ! operator.

Required Methods§

1.0.0 · source

fn not(self) -> Self::Output

Performs the unary ! operation.

§Examples
assert_eq!(!true, false);
assert_eq!(!false, true);
assert_eq!(!1u8, 254);
assert_eq!(!0u8, 255);

Implementors§

1.0.0 · source§

impl Not for &bool

§

type Output = <bool as Not>::Output

1.0.0 · source§

impl Not for &i8

§

type Output = <i8 as Not>::Output

1.0.0 · source§

impl Not for &i16

§

type Output = <i16 as Not>::Output

1.0.0 · source§

impl Not for &i32

§

type Output = <i32 as Not>::Output

1.0.0 · source§

impl Not for &i64

§

type Output = <i64 as Not>::Output

1.0.0 · source§

impl Not for &i128

§

type Output = <i128 as Not>::Output

1.0.0 · source§

impl Not for &isize

§

type Output = <isize as Not>::Output

1.0.0 · source§

impl Not for &u8

§

type Output = <u8 as Not>::Output

1.0.0 · source§

impl Not for &u16

§

type Output = <u16 as Not>::Output

1.0.0 · source§

impl Not for &u32

§

type Output = <u32 as Not>::Output

1.0.0 · source§

impl Not for &u64

§

type Output = <u64 as Not>::Output

1.0.0 · source§

impl Not for &u128

§

type Output = <u128 as Not>::Output

1.0.0 · source§

impl Not for &usize

§

type Output = <usize as Not>::Output

1.74.0 · source§

impl Not for &Saturating<i8>

1.74.0 · source§

impl Not for &Saturating<i16>

1.74.0 · source§

impl Not for &Saturating<i32>

1.74.0 · source§

impl Not for &Saturating<i64>

1.74.0 · source§

impl Not for &Saturating<i128>

1.74.0 · source§

impl Not for &Saturating<isize>

1.74.0 · source§

impl Not for &Saturating<u8>

1.74.0 · source§

impl Not for &Saturating<u16>

1.74.0 · source§

impl Not for &Saturating<u32>

1.74.0 · source§

impl Not for &Saturating<u64>

1.74.0 · source§

impl Not for &Saturating<u128>

1.74.0 · source§

impl Not for &Saturating<usize>

1.14.0 · source§

impl Not for &Wrapping<i8>

§

type Output = <Wrapping<i8> as Not>::Output

1.14.0 · source§

impl Not for &Wrapping<i16>

1.14.0 · source§

impl Not for &Wrapping<i32>

1.14.0 · source§

impl Not for &Wrapping<i64>

1.14.0 · source§

impl Not for &Wrapping<i128>

1.14.0 · source§

impl Not for &Wrapping<isize>

1.14.0 · source§

impl Not for &Wrapping<u8>

§

type Output = <Wrapping<u8> as Not>::Output

1.14.0 · source§

impl Not for &Wrapping<u16>

1.14.0 · source§

impl Not for &Wrapping<u32>

1.14.0 · source§

impl Not for &Wrapping<u64>

1.14.0 · source§

impl Not for &Wrapping<u128>

1.14.0 · source§

impl Not for &Wrapping<usize>

1.75.0 · source§

impl Not for &Ipv4Addr

1.75.0 · source§

impl Not for &Ipv6Addr

source§

impl Not for &BigInt

1.0.0 · source§

impl Not for bool

§

type Output = bool

1.0.0 · source§

impl Not for i8

§

type Output = i8

1.0.0 · source§

impl Not for i16

§

type Output = i16

1.0.0 · source§

impl Not for i32

§

type Output = i32

1.0.0 · source§

impl Not for i64

§

type Output = i64

1.0.0 · source§

impl Not for i128

§

type Output = i128

1.0.0 · source§

impl Not for isize

1.60.0 · source§

impl Not for !

§

type Output = !

1.0.0 · source§

impl Not for u8

§

type Output = u8

1.0.0 · source§

impl Not for u16

§

type Output = u16

1.0.0 · source§

impl Not for u32

§

type Output = u32

1.0.0 · source§

impl Not for u64

§

type Output = u64

1.0.0 · source§

impl Not for u128

§

type Output = u128

1.0.0 · source§

impl Not for usize

§

impl Not for Capabilities

§

impl Not for U256

§

type Output = U256

§

impl Not for U512

§

type Output = U512

1.74.0 · source§

impl Not for Saturating<i8>

1.74.0 · source§

impl Not for Saturating<i16>

1.74.0 · source§

impl Not for Saturating<i32>

1.74.0 · source§

impl Not for Saturating<i64>

1.74.0 · source§

impl Not for Saturating<i128>

1.74.0 · source§

impl Not for Saturating<isize>

1.74.0 · source§

impl Not for Saturating<u8>

1.74.0 · source§

impl Not for Saturating<u16>

1.74.0 · source§

impl Not for Saturating<u32>

1.74.0 · source§

impl Not for Saturating<u64>

1.74.0 · source§

impl Not for Saturating<u128>

1.74.0 · source§

impl Not for Saturating<usize>

1.0.0 · source§

impl Not for Wrapping<i8>

1.0.0 · source§

impl Not for Wrapping<i16>

1.0.0 · source§

impl Not for Wrapping<i32>

1.0.0 · source§

impl Not for Wrapping<i64>

1.0.0 · source§

impl Not for Wrapping<i128>

1.0.0 · source§

impl Not for Wrapping<isize>

1.0.0 · source§

impl Not for Wrapping<u8>

1.0.0 · source§

impl Not for Wrapping<u16>

1.0.0 · source§

impl Not for Wrapping<u32>

1.0.0 · source§

impl Not for Wrapping<u64>

1.0.0 · source§

impl Not for Wrapping<u128>

1.0.0 · source§

impl Not for Wrapping<usize>

1.75.0 · source§

impl Not for Ipv4Addr

1.75.0 · source§

impl Not for Ipv6Addr

source§

impl Not for BigInt

source§

impl Not for Choice

source§

impl Not for B0

Not of 0 (!0 = 1)

§

type Output = B1

source§

impl Not for B1

Not of 1 (!1 = 0)

§

type Output = B0

§

impl Not for Access

§

type Output = Access

§

impl Not for Access

§

type Output = Access

§

impl Not for AtFlags

§

type Output = AtFlags

§

impl Not for AtFlags

§

type Output = AtFlags

§

impl Not for ControlModes

§

type Output = ControlModes

§

impl Not for CreateFlags

§

type Output = CreateFlags

§

impl Not for CreateFlags

§

type Output = CreateFlags

§

impl Not for CreateFlags

§

type Output = CreateFlags

§

impl Not for CreateFlags

§

type Output = CreateFlags

§

impl Not for DupFlags

§

type Output = DupFlags

§

impl Not for DupFlags

§

type Output = DupFlags

§

impl Not for DupFlags

§

type Output = DupFlags

§

impl Not for EventFlags

§

type Output = EventFlags

§

impl Not for EventFlags

§

type Output = EventFlags

§

impl Not for EventfdFlags

§

type Output = EventfdFlags

§

impl Not for EventfdFlags

§

type Output = EventfdFlags

§

impl Not for FallocateFlags

§

type Output = FallocateFlags

§

impl Not for FallocateFlags

§

type Output = FallocateFlags

§

impl Not for FdFlags

§

type Output = FdFlags

§

impl Not for FdFlags

§

type Output = FdFlags

§

impl Not for FdFlags

§

type Output = FdFlags

§

impl Not for IFlags

§

type Output = IFlags

§

impl Not for InputModes

§

type Output = InputModes

§

impl Not for LocalModes

§

type Output = LocalModes

§

impl Not for MapFlags

§

type Output = MapFlags

§

impl Not for MemfdFlags

§

type Output = MemfdFlags

§

impl Not for MemfdFlags

§

type Output = MemfdFlags

§

impl Not for MlockFlags

§

type Output = MlockFlags

§

impl Not for Mode

§

type Output = Mode

§

impl Not for Mode

§

type Output = Mode

§

impl Not for MountFlags

§

type Output = MountFlags

§

impl Not for MountFlags

§

type Output = MountFlags

§

impl Not for MountPropagationFlags

§

type Output = MountPropagationFlags

§

impl Not for MountPropagationFlags

§

type Output = MountPropagationFlags

§

impl Not for MprotectFlags

§

type Output = MprotectFlags

§

impl Not for MremapFlags

§

type Output = MremapFlags

§

impl Not for MsyncFlags

§

type Output = MsyncFlags

§

impl Not for OFlags

§

type Output = OFlags

§

impl Not for OFlags

§

type Output = OFlags

§

impl Not for OutputModes

§

type Output = OutputModes

§

impl Not for PipeFlags

§

type Output = PipeFlags

§

impl Not for PipeFlags

§

type Output = PipeFlags

§

impl Not for PollFlags

§

type Output = PollFlags

§

impl Not for PollFlags

§

type Output = PollFlags

§

impl Not for ProtFlags

§

type Output = ProtFlags

§

impl Not for ReadFlags

§

type Output = ReadFlags

§

impl Not for ReadWriteFlags

§

type Output = ReadWriteFlags

§

impl Not for ReadWriteFlags

§

type Output = ReadWriteFlags

§

impl Not for ReadWriteFlags

§

type Output = ReadWriteFlags

§

impl Not for RenameFlags

§

type Output = RenameFlags

§

impl Not for RenameFlags

§

type Output = RenameFlags

§

impl Not for ResolveFlags

§

type Output = ResolveFlags

§

impl Not for ResolveFlags

§

type Output = ResolveFlags

§

impl Not for SealFlags

§

type Output = SealFlags

§

impl Not for SealFlags

§

type Output = SealFlags

§

impl Not for SpliceFlags

§

type Output = SpliceFlags

§

impl Not for SpliceFlags

§

type Output = SpliceFlags

§

impl Not for StatVfsMountFlags

§

type Output = StatVfsMountFlags

§

impl Not for StatVfsMountFlags

§

type Output = StatVfsMountFlags

§

impl Not for StatxFlags

§

type Output = StatxFlags

§

impl Not for StatxFlags

§

type Output = StatxFlags

§

impl Not for U128

§

type Output = U128

§

impl Not for UnmountFlags

§

type Output = UnmountFlags

§

impl Not for UnmountFlags

§

type Output = UnmountFlags

§

impl Not for UserfaultfdFlags

§

type Output = UserfaultfdFlags

§

impl Not for WatchFlags

§

type Output = WatchFlags

§

impl Not for WatchFlags

§

type Output = WatchFlags

§

impl Not for XattrFlags

§

type Output = XattrFlags

§

impl Not for XattrFlags

§

type Output = XattrFlags

§

impl<'a, T, O> Not for &'a mut BitSlice<T, O>
where T: BitStore, O: BitOrder,

Inverts each bit in the bit-slice.

Unlike the &, |, and ^ operators, this implementation is guaranteed to update each memory element only once, and is not required to traverse every live bit in the underlying region.

§

type Output = &'a mut BitSlice<T, O>

§

impl<A, O> Not for BitArray<A, O>
where A: BitViewSized, O: BitOrder,

§

type Output = BitArray<A, O>

§

impl<M, T, O> Not for BitRef<'_, M, T, O>
where M: Mutability, T: BitStore, O: BitOrder,

§

type Output = bool

§

impl<R> Not for BitMask<R>
where R: BitRegister,

§

type Output = BitMask<R>

§

impl<T, D> Not for TypeWithDefault<T, D>
where T: Not<Output = T>, D: Get<T>,

§

impl<T, O> Not for BitBox<T, O>
where T: BitStore, O: BitOrder,

§

type Output = BitBox<T, O>

§

impl<T, O> Not for BitVec<T, O>
where T: BitStore, O: BitOrder,

This implementation inverts all elements in the live buffer. You cannot rely on the value of bits in the buffer that are outside the domain of [BitVec::as_mut_bitslice].

§

type Output = BitVec<T, O>

source§

impl<T, const N: usize> Not for Mask<T, N>

§

type Output = Mask<T, N>

source§

impl<const N: usize> Not for Simd<i8, N>

§

type Output = Simd<i8, N>

source§

impl<const N: usize> Not for Simd<i16, N>

§

type Output = Simd<i16, N>

source§

impl<const N: usize> Not for Simd<i32, N>

§

type Output = Simd<i32, N>

source§

impl<const N: usize> Not for Simd<i64, N>

§

type Output = Simd<i64, N>

source§

impl<const N: usize> Not for Simd<isize, N>

§

type Output = Simd<isize, N>

source§

impl<const N: usize> Not for Simd<u8, N>

§

type Output = Simd<u8, N>

source§

impl<const N: usize> Not for Simd<u16, N>

§

type Output = Simd<u16, N>

source§

impl<const N: usize> Not for Simd<u32, N>

§

type Output = Simd<u32, N>

source§

impl<const N: usize> Not for Simd<u64, N>

§

type Output = Simd<u64, N>

source§

impl<const N: usize> Not for Simd<usize, N>

§

type Output = Simd<usize, N>