pub trait CoreArith {
// Required methods
fn add<const CALC_SCALE: u32, const SCALE_OUT: u32>(
&self,
other: &Self,
env: &Env,
return_i256: bool,
) -> Result<SoroResult, ArithmeticError>;
fn sub<const CALC_SCALE: u32, const SCALE_OUT: u32>(
&self,
other: &Self,
env: &Env,
return_i256: bool,
) -> Result<SoroResult, ArithmeticError>;
fn mul<const CALC_SCALE: u32, const SCALE_OUT: u32>(
&self,
other: &Self,
env: &Env,
return_i256: bool,
) -> Result<SoroResult, ArithmeticError>;
fn div<const CALC_SCALE: u32, const SCALE_OUT: u32>(
&self,
other: &Self,
env: &Env,
return_i256: bool,
) -> Result<SoroResult, ArithmeticError>;
}
Required Methods§
fn add<const CALC_SCALE: u32, const SCALE_OUT: u32>( &self, other: &Self, env: &Env, return_i256: bool, ) -> Result<SoroResult, ArithmeticError>
fn sub<const CALC_SCALE: u32, const SCALE_OUT: u32>( &self, other: &Self, env: &Env, return_i256: bool, ) -> Result<SoroResult, ArithmeticError>
fn mul<const CALC_SCALE: u32, const SCALE_OUT: u32>( &self, other: &Self, env: &Env, return_i256: bool, ) -> Result<SoroResult, ArithmeticError>
fn div<const CALC_SCALE: u32, const SCALE_OUT: u32>( &self, other: &Self, env: &Env, return_i256: bool, ) -> Result<SoroResult, ArithmeticError>
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.