pub trait SafeMath<T>: Sized {
// Required methods
fn safe_add(self, rhs: Self) -> Result<Self, LBError>;
fn safe_mul(self, rhs: Self) -> Result<Self, LBError>;
fn safe_div(self, rhs: Self) -> Result<Self, LBError>;
fn safe_rem(self, rhs: Self) -> Result<Self, LBError>;
fn safe_sub(self, rhs: Self) -> Result<Self, LBError>;
fn safe_shl(self, offset: T) -> Result<Self, LBError>;
fn safe_shr(self, offset: T) -> Result<Self, LBError>;
}Required Methods§
fn safe_add(self, rhs: Self) -> Result<Self, LBError>
fn safe_mul(self, rhs: Self) -> Result<Self, LBError>
fn safe_div(self, rhs: Self) -> Result<Self, LBError>
fn safe_rem(self, rhs: Self) -> Result<Self, LBError>
fn safe_sub(self, rhs: Self) -> Result<Self, LBError>
fn safe_shl(self, offset: T) -> Result<Self, LBError>
fn safe_shr(self, offset: T) -> Result<Self, LBError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".