pub trait ConversionFromAssetBalance<AssetBalance, AssetId, OutBalance> {
type Error;
// Required methods
fn from_asset_balance(
balance: AssetBalance,
asset_id: AssetId,
) -> Result<OutBalance, Self::Error>;
fn ensure_successful(asset_id: AssetId);
}
Expand description
Converts an asset balance value into balance.
Required Associated Types§
Required Methods§
fn from_asset_balance( balance: AssetBalance, asset_id: AssetId, ) -> Result<OutBalance, Self::Error>
Sourcefn ensure_successful(asset_id: AssetId)
fn ensure_successful(asset_id: AssetId)
Ensures that a conversion for the asset_id
will be successful if done immediately after
this call.
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.