pub trait FixedSupplyToken<M>where
M: ManagedTypeApi,{
// Required methods
fn get_total_supply(&self) -> BigUint<M>;
fn into_part(self, payment_amount: &BigUint<M>) -> Self;
// Provided methods
fn rule_of_three(
&self,
current_supply: &BigUint<M>,
full_value: &BigUint<M>,
) -> BigUint<M> { ... }
fn rule_of_three_non_zero_result(
&self,
current_supply: &BigUint<M>,
full_value: &BigUint<M>,
) -> BigUint<M> { ... }
}
Required Methods§
fn get_total_supply(&self) -> BigUint<M>
fn into_part(self, payment_amount: &BigUint<M>) -> Self
Provided Methods§
Sourcefn rule_of_three(
&self,
current_supply: &BigUint<M>,
full_value: &BigUint<M>,
) -> BigUint<M>
fn rule_of_three( &self, current_supply: &BigUint<M>, full_value: &BigUint<M>, ) -> BigUint<M>
full_value * current_supply / total_supply
Sourcefn rule_of_three_non_zero_result(
&self,
current_supply: &BigUint<M>,
full_value: &BigUint<M>,
) -> BigUint<M>
fn rule_of_three_non_zero_result( &self, current_supply: &BigUint<M>, full_value: &BigUint<M>, ) -> BigUint<M>
full_value * current_supply / total_supply
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.