Function chain_lib::calculator::try_sub
source · pub fn try_sub(left: u128, right: u128) -> Option<u128>Expand description
The function try_sub in Rust attempts to subtract two u128 values and returns the result if it
is greater than the second value, otherwise it returns None.
Arguments:
left: Theleftparameter represents the value from which you want to subtract another value.right: Therightparameter is the value that will be subtracted from theleftparameter in thetry_subfunction.
Returns:
The function try_sub returns an Option<u128>. It returns None if the left value is less than
the right value. If the subtraction result is greater than the right value, it returns
Some(sub_value), where sub_value is the result of the subtraction. Otherwise, it returns None.