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§
Sourcefn try_sub(self, rhs: Self) -> Result<Self, ProgramError>
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.