pub struct Combiner<AccountId, TestKey, A, B>(/* private fields */);Trait Implementations§
Source§impl<AccountId, TestKey, A, B> Inspect<AccountId> for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Inspect<AccountId> for Combiner<AccountId, TestKey, A, B>
Source§type AssetId = <B as Inspect<AccountId>>::AssetId
type AssetId = <B as Inspect<AccountId>>::AssetId
Means of identifying one asset class from another.
Source§type Balance = <B as Inspect<AccountId>>::Balance
type Balance = <B as Inspect<AccountId>>::Balance
Scalar type for representing balance of an account.
Source§fn total_issuance(asset: Self::AssetId) -> Self::Balance
fn total_issuance(asset: Self::AssetId) -> Self::Balance
The total amount of issuance in the system.
Source§fn minimum_balance(asset: Self::AssetId) -> Self::Balance
fn minimum_balance(asset: Self::AssetId) -> Self::Balance
The minimum balance any single account may have.
Source§fn balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance
fn balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance
Get the balance of
who which does not include funds which are exclusively allocated to
subsystems of the chain (“on hold” or “reserved”). Read moreSource§fn total_balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance
fn total_balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance
Get the total amount of funds whose ultimate beneficial ownership can be determined as
who. Read moreSource§fn reducible_balance(
asset: Self::AssetId,
who: &AccountId,
preservation: Preservation,
fortitude: Fortitude,
) -> Self::Balance
fn reducible_balance( asset: Self::AssetId, who: &AccountId, preservation: Preservation, fortitude: Fortitude, ) -> Self::Balance
Get the maximum amount that
who can withdraw/transfer successfully based on whether the
account should be kept alive (preservation) or whether we are willing to force the
transfer and potentially go below user-level restrictions on the minimum amount of the
account. Read moreSource§fn can_deposit(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
provenance: Provenance,
) -> DepositConsequence
fn can_deposit( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, provenance: Provenance, ) -> DepositConsequence
Source§fn can_withdraw(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
) -> WithdrawConsequence<Self::Balance>
fn can_withdraw( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, ) -> WithdrawConsequence<Self::Balance>
Returns
Failed if the asset balance of who may not be decreased by amount, otherwise
the consequence.Source§fn asset_exists(asset: Self::AssetId) -> bool
fn asset_exists(asset: Self::AssetId) -> bool
Returns
true if an asset exists.Source§fn active_issuance(asset: Self::AssetId) -> Self::Balance
fn active_issuance(asset: Self::AssetId) -> Self::Balance
The total amount of issuance in the system excluding those which are controlled by the
system.
Source§impl<AccountId, TestKey, A, B> Mutate<AccountId> for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Mutate<AccountId> for Combiner<AccountId, TestKey, A, B>
Source§fn mint_into(
asset: Self::AssetId,
dest: &AccountId,
amount: Self::Balance,
) -> Result<Self::Balance, DispatchError>
fn mint_into( asset: Self::AssetId, dest: &AccountId, amount: Self::Balance, ) -> Result<Self::Balance, DispatchError>
Increase the balance of
who by exactly amount, minting new tokens. If that isn’t
possible then an Err is returned and nothing is changed.Source§fn burn_from(
asset: Self::AssetId,
dest: &AccountId,
amount: Self::Balance,
preservation: Preservation,
precision: Precision,
fortitude: Fortitude,
) -> Result<Self::Balance, DispatchError>
fn burn_from( asset: Self::AssetId, dest: &AccountId, amount: Self::Balance, preservation: Preservation, precision: Precision, fortitude: Fortitude, ) -> Result<Self::Balance, DispatchError>
Decrease the balance of
who by at least amount, possibly slightly more in the case of
minimum-balance requirements, burning the tokens. If that isn’t possible then an Err is
returned and nothing is changed. If successful, the amount of tokens reduced is returned.Source§fn transfer(
asset: Self::AssetId,
source: &AccountId,
dest: &AccountId,
amount: Self::Balance,
preservation: Preservation,
) -> Result<Self::Balance, DispatchError>
fn transfer( asset: Self::AssetId, source: &AccountId, dest: &AccountId, amount: Self::Balance, preservation: Preservation, ) -> Result<Self::Balance, DispatchError>
Transfer funds from one account into another. Read more
Source§fn shelve(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
) -> Result<Self::Balance, DispatchError>
fn shelve( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, ) -> Result<Self::Balance, DispatchError>
Source§fn restore(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
) -> Result<Self::Balance, DispatchError>
fn restore( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, ) -> Result<Self::Balance, DispatchError>
Source§fn set_balance(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
) -> Self::Balance
fn set_balance( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, ) -> Self::Balance
Simple infallible function to force an account to have a particular balance, good for use
in tests and benchmarks but not recommended for production code owing to the lack of
error reporting. Read more
fn done_mint_into( _asset: Self::AssetId, _who: &AccountId, _amount: Self::Balance, )
fn done_burn_from( _asset: Self::AssetId, _who: &AccountId, _amount: Self::Balance, )
fn done_shelve(_asset: Self::AssetId, _who: &AccountId, _amount: Self::Balance)
fn done_restore(_asset: Self::AssetId, _who: &AccountId, _amount: Self::Balance)
fn done_transfer( _asset: Self::AssetId, _source: &AccountId, _dest: &AccountId, _amount: Self::Balance, )
Source§impl<AccountId, TestKey, A, B> Unbalanced<AccountId> for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Unbalanced<AccountId> for Combiner<AccountId, TestKey, A, B>
Source§fn handle_dust(_dust: Dust<AccountId, Self>)
fn handle_dust(_dust: Dust<AccountId, Self>)
Do something with the dust which has been destroyed from the system.
Dust can be converted
into a Credit with the Balanced trait impl.Source§fn write_balance(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
) -> Result<Option<Self::Balance>, DispatchError>
fn write_balance( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, ) -> Result<Option<Self::Balance>, DispatchError>
Source§fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance)
fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance)
Set the total issuance to
amount.Source§fn handle_raw_dust(asset: Self::AssetId, amount: Self::Balance)
fn handle_raw_dust(asset: Self::AssetId, amount: Self::Balance)
Create some dust and handle it with
Self::handle_dust. This is an unbalanced operation
and it must only be used when an account is modified in a raw fashion, outside of the entire
fungibles API. The amount is capped at Self::minimum_balance() - 1. Read moreSource§fn decrease_balance(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
precision: Precision,
preservation: Preservation,
force: Fortitude,
) -> Result<Self::Balance, DispatchError>
fn decrease_balance( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, precision: Precision, preservation: Preservation, force: Fortitude, ) -> Result<Self::Balance, DispatchError>
Source§fn increase_balance(
asset: Self::AssetId,
who: &AccountId,
amount: Self::Balance,
precision: Precision,
) -> Result<Self::Balance, DispatchError>
fn increase_balance( asset: Self::AssetId, who: &AccountId, amount: Self::Balance, precision: Precision, ) -> Result<Self::Balance, DispatchError>
Source§fn deactivate(_asset: Self::AssetId, _: Self::Balance)
fn deactivate(_asset: Self::AssetId, _: Self::Balance)
Reduce the active issuance by some amount.
Source§fn reactivate(_asset: Self::AssetId, _: Self::Balance)
fn reactivate(_asset: Self::AssetId, _: Self::Balance)
Increase the active issuance by some amount, up to the outstanding amount reduced.
Auto Trait Implementations§
impl<AccountId, TestKey, A, B> Freeze for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> RefUnwindSafe for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Send for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Sync for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> Unpin for Combiner<AccountId, TestKey, A, B>
impl<AccountId, TestKey, A, B> UnwindSafe for Combiner<AccountId, TestKey, A, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.