Trait TryNeg

Source
pub trait TryNeg {
    type Output;
    type Error;

    // Required method
    fn try_neg(self) -> Result<Self::Output, Self::Error>;
}
Expand description

Checked negation operator which returns a Result to indicate success or failure.

Required Associated Types§

Required Methods§

Source

fn try_neg(self) -> Result<Self::Output, Self::Error>

Implementations on Foreign Types§

Source§

impl TryNeg for i8

Source§

impl TryNeg for i16

Source§

impl TryNeg for i32

Source§

impl TryNeg for i64

Source§

impl TryNeg for i128

Source§

impl TryNeg for isize

Source§

impl TryNeg for u8

Source§

impl TryNeg for u16

Source§

impl TryNeg for u32

Source§

impl TryNeg for u64

Source§

impl TryNeg for u128

Source§

impl TryNeg for usize

Source§

impl<'a> TryNeg for &'a i8

Source§

type Output = i8

Source§

type Error = <i8 as TryNeg>::Error

Source§

fn try_neg(self) -> Result<i8, Self::Error>

Source§

impl<'a> TryNeg for &'a i16

Source§

impl<'a> TryNeg for &'a i32

Source§

impl<'a> TryNeg for &'a i64

Source§

impl<'a> TryNeg for &'a i128

Source§

impl<'a> TryNeg for &'a isize

Source§

impl<'a> TryNeg for &'a u8

Source§

type Output = u8

Source§

type Error = <u8 as TryNeg>::Error

Source§

fn try_neg(self) -> Result<u8, Self::Error>

Source§

impl<'a> TryNeg for &'a u16

Source§

impl<'a> TryNeg for &'a u32

Source§

impl<'a> TryNeg for &'a u64

Source§

impl<'a> TryNeg for &'a u128

Source§

impl<'a> TryNeg for &'a usize

Implementors§