Trait common_primitives::capacity::Nontransferable
source · pub trait Nontransferable {
type Balance: Balance;
// Required methods
fn balance(msa_id: MessageSourceId) -> Self::Balance;
fn deduct(
msa_id: MessageSourceId,
amount: Self::Balance
) -> Result<(), DispatchError>;
fn deposit(
msa_id: MessageSourceId,
amount: Self::Balance
) -> Result<(), DispatchError>;
}
Expand description
A trait for Non-transferable asset.
Required Associated Types§
Required Methods§
sourcefn balance(msa_id: MessageSourceId) -> Self::Balance
fn balance(msa_id: MessageSourceId) -> Self::Balance
The balance Capacity for an MSA account.
sourcefn deduct(
msa_id: MessageSourceId,
amount: Self::Balance
) -> Result<(), DispatchError>
fn deduct( msa_id: MessageSourceId, amount: Self::Balance ) -> Result<(), DispatchError>
Reduce Capacity of an MSA account by amount.
sourcefn deposit(
msa_id: MessageSourceId,
amount: Self::Balance
) -> Result<(), DispatchError>
fn deposit( msa_id: MessageSourceId, amount: Self::Balance ) -> Result<(), DispatchError>
Increase Capacity of an MSA account by an amount.
Object Safety§
This trait is not object safe.