Trait CheckedNeg

Source
pub trait CheckedNeg: Sized {
    type Output;

    // Required method
    fn checked_neg(self) -> Option<Self>;
}

Required Associated Types§

Required Methods§

Source

fn checked_neg(self) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CheckedNeg for i8

Source§

impl CheckedNeg for i16

Source§

impl CheckedNeg for i32

Source§

impl CheckedNeg for i64

Source§

impl CheckedNeg for i128

Source§

impl CheckedNeg for isize

Source§

impl CheckedNeg for u8

Source§

impl CheckedNeg for u16

Source§

impl CheckedNeg for u32

Source§

impl CheckedNeg for u64

Source§

impl CheckedNeg for u128

Source§

impl CheckedNeg for usize

Implementors§