pub trait Replenishable {
type Balance: Balance;
// Required methods
fn replenish_by_amount(
msa_id: MessageSourceId,
amount: Self::Balance,
) -> Result<(), DispatchError>;
fn replenish_all_for(msa_id: MessageSourceId) -> Result<(), DispatchError>;
fn can_replenish(msa_id: MessageSourceId) -> bool;
}
Expand description
A trait for replenishing Capacity.
Required Associated Types§
Required Methods§
Sourcefn replenish_by_amount(
msa_id: MessageSourceId,
amount: Self::Balance,
) -> Result<(), DispatchError>
fn replenish_by_amount( msa_id: MessageSourceId, amount: Self::Balance, ) -> Result<(), DispatchError>
Replenish an MSA’s Capacity by an amount.
Sourcefn replenish_all_for(msa_id: MessageSourceId) -> Result<(), DispatchError>
fn replenish_all_for(msa_id: MessageSourceId) -> Result<(), DispatchError>
Replenish all Capacity balance for an MSA.
Sourcefn can_replenish(msa_id: MessageSourceId) -> bool
fn can_replenish(msa_id: MessageSourceId) -> bool
Checks if an account can be replenished.
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.