Trait TrySub

Source
pub trait TrySub<Rhs = Self> {
    type Output;
    type Error;

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

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

Required Associated Types§

Required Methods§

Source

fn try_sub(self, rhs: Rhs) -> Result<Self::Output, Self::Error>

Implementations on Foreign Types§

Source§

impl TrySub for i8

Source§

impl TrySub for i16

Source§

impl TrySub for i32

Source§

impl TrySub for i64

Source§

impl TrySub for i128

Source§

impl TrySub for isize

Source§

impl TrySub for u8

Source§

impl TrySub for u16

Source§

impl TrySub for u32

Source§

impl TrySub for u64

Source§

impl TrySub for u128

Source§

impl TrySub for usize

Source§

impl<'a> TrySub<i8> for &'a i8

Source§

type Output = i8

Source§

type Error = <i8 as TrySub>::Error

Source§

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

Source§

impl<'a> TrySub<i16> for &'a i16

Source§

type Output = i16

Source§

type Error = <i16 as TrySub>::Error

Source§

fn try_sub(self, rhs: i16) -> Result<i16, Self::Error>

Source§

impl<'a> TrySub<i32> for &'a i32

Source§

type Output = i32

Source§

type Error = <i32 as TrySub>::Error

Source§

fn try_sub(self, rhs: i32) -> Result<i32, Self::Error>

Source§

impl<'a> TrySub<i64> for &'a i64

Source§

type Output = i64

Source§

type Error = <i64 as TrySub>::Error

Source§

fn try_sub(self, rhs: i64) -> Result<i64, Self::Error>

Source§

impl<'a> TrySub<i128> for &'a i128

Source§

type Output = i128

Source§

type Error = <i128 as TrySub>::Error

Source§

fn try_sub(self, rhs: i128) -> Result<i128, Self::Error>

Source§

impl<'a> TrySub<isize> for &'a isize

Source§

impl<'a> TrySub<u8> for &'a u8

Source§

type Output = u8

Source§

type Error = <u8 as TrySub>::Error

Source§

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

Source§

impl<'a> TrySub<u16> for &'a u16

Source§

type Output = u16

Source§

type Error = <u16 as TrySub>::Error

Source§

fn try_sub(self, rhs: u16) -> Result<u16, Self::Error>

Source§

impl<'a> TrySub<u32> for &'a u32

Source§

type Output = u32

Source§

type Error = <u32 as TrySub>::Error

Source§

fn try_sub(self, rhs: u32) -> Result<u32, Self::Error>

Source§

impl<'a> TrySub<u64> for &'a u64

Source§

type Output = u64

Source§

type Error = <u64 as TrySub>::Error

Source§

fn try_sub(self, rhs: u64) -> Result<u64, Self::Error>

Source§

impl<'a> TrySub<u128> for &'a u128

Source§

type Output = u128

Source§

type Error = <u128 as TrySub>::Error

Source§

fn try_sub(self, rhs: u128) -> Result<u128, Self::Error>

Source§

impl<'a> TrySub<usize> for &'a usize

Source§

impl<'a, 'r> TrySub<&'r i8> for &'a i8

Source§

type Output = i8

Source§

type Error = <i8 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i8) -> Result<i8, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r i16> for &'a i16

Source§

type Output = i16

Source§

type Error = <i16 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i16) -> Result<i16, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r i32> for &'a i32

Source§

type Output = i32

Source§

type Error = <i32 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i32) -> Result<i32, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r i64> for &'a i64

Source§

type Output = i64

Source§

type Error = <i64 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i64) -> Result<i64, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r i128> for &'a i128

Source§

type Output = i128

Source§

type Error = <i128 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i128) -> Result<i128, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r isize> for &'a isize

Source§

type Output = isize

Source§

type Error = <isize as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r isize) -> Result<isize, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r u8> for &'a u8

Source§

type Output = u8

Source§

type Error = <u8 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u8) -> Result<u8, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r u16> for &'a u16

Source§

type Output = u16

Source§

type Error = <u16 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u16) -> Result<u16, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r u32> for &'a u32

Source§

type Output = u32

Source§

type Error = <u32 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u32) -> Result<u32, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r u64> for &'a u64

Source§

type Output = u64

Source§

type Error = <u64 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u64) -> Result<u64, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r u128> for &'a u128

Source§

type Output = u128

Source§

type Error = <u128 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u128) -> Result<u128, Self::Error>

Source§

impl<'a, 'r> TrySub<&'r usize> for &'a usize

Source§

type Output = usize

Source§

type Error = <usize as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r usize) -> Result<usize, Self::Error>

Source§

impl<'r> TrySub<&'r i8> for i8

Source§

type Output = i8

Source§

type Error = <i8 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i8) -> Result<i8, Self::Error>

Source§

impl<'r> TrySub<&'r i16> for i16

Source§

type Output = i16

Source§

type Error = <i16 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i16) -> Result<i16, Self::Error>

Source§

impl<'r> TrySub<&'r i32> for i32

Source§

type Output = i32

Source§

type Error = <i32 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i32) -> Result<i32, Self::Error>

Source§

impl<'r> TrySub<&'r i64> for i64

Source§

type Output = i64

Source§

type Error = <i64 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i64) -> Result<i64, Self::Error>

Source§

impl<'r> TrySub<&'r i128> for i128

Source§

type Output = i128

Source§

type Error = <i128 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r i128) -> Result<i128, Self::Error>

Source§

impl<'r> TrySub<&'r isize> for isize

Source§

type Output = isize

Source§

type Error = <isize as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r isize) -> Result<isize, Self::Error>

Source§

impl<'r> TrySub<&'r u8> for u8

Source§

type Output = u8

Source§

type Error = <u8 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u8) -> Result<u8, Self::Error>

Source§

impl<'r> TrySub<&'r u16> for u16

Source§

type Output = u16

Source§

type Error = <u16 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u16) -> Result<u16, Self::Error>

Source§

impl<'r> TrySub<&'r u32> for u32

Source§

type Output = u32

Source§

type Error = <u32 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u32) -> Result<u32, Self::Error>

Source§

impl<'r> TrySub<&'r u64> for u64

Source§

type Output = u64

Source§

type Error = <u64 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u64) -> Result<u64, Self::Error>

Source§

impl<'r> TrySub<&'r u128> for u128

Source§

type Output = u128

Source§

type Error = <u128 as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r u128) -> Result<u128, Self::Error>

Source§

impl<'r> TrySub<&'r usize> for usize

Source§

type Output = usize

Source§

type Error = <usize as TrySub>::Error

Source§

fn try_sub(self, rhs: &'r usize) -> Result<usize, Self::Error>

Implementors§