[−][src]Struct orml_currencies::BasicCurrencyAdapter
Adapt other currency traits implementation to BasicCurrency
.
Trait Implementations
impl<T, AccountId, Currency, Amount, Moment> BasicCurrency<AccountId> for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Currency: PalletCurrency<AccountId>,
T: Trait,
[src]
Currency: PalletCurrency<AccountId>,
T: Trait,
type Balance = <Currency as PalletCurrency<AccountId>>::Balance
The balance of an account.
fn total_issuance() -> Self::Balance
[src]
fn total_balance(who: &AccountId) -> Self::Balance
[src]
fn free_balance(who: &AccountId) -> Self::Balance
[src]
fn ensure_can_withdraw(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn transfer(
from: &AccountId,
to: &AccountId,
amount: Self::Balance
) -> DispatchResult
[src]
from: &AccountId,
to: &AccountId,
amount: Self::Balance
) -> DispatchResult
fn deposit(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn withdraw(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn can_slash(who: &AccountId, amount: Self::Balance) -> bool
[src]
fn slash(who: &AccountId, amount: Self::Balance) -> Self::Balance
[src]
impl<T, AccountId, Currency, Amount, Moment> BasicCurrencyExtended<AccountId> for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: Signed + TryInto<<Currency as PalletCurrency<AccountId>>::Balance> + TryFrom<<Currency as PalletCurrency<AccountId>>::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default,
Currency: PalletCurrency<AccountId>,
T: Trait,
[src]
Amount: Signed + TryInto<<Currency as PalletCurrency<AccountId>>::Balance> + TryFrom<<Currency as PalletCurrency<AccountId>>::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default,
Currency: PalletCurrency<AccountId>,
T: Trait,
type Amount = Amount
The signed type for balance related operations, typically signed int.
fn update_balance(who: &AccountId, by_amount: Self::Amount) -> DispatchResult
[src]
impl<T, AccountId, Currency, Amount, Moment> BasicLockableCurrency<AccountId> for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Currency: PalletLockableCurrency<AccountId>,
T: Trait,
[src]
Currency: PalletLockableCurrency<AccountId>,
T: Trait,
type Moment = Moment
The quantity used to denote time; usually just a BlockNumber
.
fn set_lock(lock_id: LockIdentifier, who: &AccountId, amount: Self::Balance)
[src]
fn extend_lock(lock_id: LockIdentifier, who: &AccountId, amount: Self::Balance)
[src]
fn remove_lock(lock_id: LockIdentifier, who: &AccountId)
[src]
impl<T, AccountId, Currency, Amount, Moment> BasicReservableCurrency<AccountId> for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Currency: PalletReservableCurrency<AccountId>,
T: Trait,
[src]
Currency: PalletReservableCurrency<AccountId>,
T: Trait,
fn can_reserve(who: &AccountId, value: Self::Balance) -> bool
[src]
fn slash_reserved(who: &AccountId, value: Self::Balance) -> Self::Balance
[src]
fn reserved_balance(who: &AccountId) -> Self::Balance
[src]
fn reserve(who: &AccountId, value: Self::Balance) -> DispatchResult
[src]
fn unreserve(who: &AccountId, value: Self::Balance) -> Self::Balance
[src]
fn repatriate_reserved(
slashed: &AccountId,
beneficiary: &AccountId,
value: Self::Balance,
status: BalanceStatus
) -> Result<Self::Balance, DispatchError>
[src]
slashed: &AccountId,
beneficiary: &AccountId,
value: Self::Balance,
status: BalanceStatus
) -> Result<Self::Balance, DispatchError>
Auto Trait Implementations
impl<T, Currency, Amount, Moment> RefUnwindSafe for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: RefUnwindSafe,
Currency: RefUnwindSafe,
Moment: RefUnwindSafe,
T: RefUnwindSafe,
Amount: RefUnwindSafe,
Currency: RefUnwindSafe,
Moment: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Currency, Amount, Moment> Send for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: Send,
Currency: Send,
Moment: Send,
T: Send,
Amount: Send,
Currency: Send,
Moment: Send,
T: Send,
impl<T, Currency, Amount, Moment> Sync for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: Sync,
Currency: Sync,
Moment: Sync,
T: Sync,
Amount: Sync,
Currency: Sync,
Moment: Sync,
T: Sync,
impl<T, Currency, Amount, Moment> Unpin for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: Unpin,
Currency: Unpin,
Moment: Unpin,
T: Unpin,
Amount: Unpin,
Currency: Unpin,
Moment: Unpin,
T: Unpin,
impl<T, Currency, Amount, Moment> UnwindSafe for BasicCurrencyAdapter<T, Currency, Amount, Moment> where
Amount: UnwindSafe,
Currency: UnwindSafe,
Moment: UnwindSafe,
T: UnwindSafe,
Amount: UnwindSafe,
Currency: UnwindSafe,
Moment: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsType<T> for T
[src]
fn from_ref(t: &T) -> &T
[src]
fn into_ref(&self) -> &T
[src]
fn from_mut(t: &mut T) -> &mut T
[src]
fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
fn from_ref(outer: &Outer) -> &T
Get a reference to the inner from the outer.
fn from_mut(outer: &mut Outer) -> &mut T
Get a mutable reference to the inner from the outer.
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
T: Bounded,
fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,