Trait TrySub

Source
pub trait TrySub: Sized {
    // Required method
    fn try_sub(self, rhs: Self) -> Result<Self, ProgramError>;
}
Expand description

Try to subtract, return an error on underflow

Required Methods§

Source

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

Subtract

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.

Implementors§