Struct stp258_serp::CurrencyAdapter [−][src]
Trait Implementations
impl<T, GetCurrencyId> Currency<<T as Config>::AccountId> for CurrencyAdapter<T, GetCurrencyId> where
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
[src]
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
type Balance = T::Balance
The balance of an account.
type PositiveImbalance = PositiveImbalance<T, GetCurrencyId>
The opaque token type for an imbalance. This is returned by unbalanced operations and must be dealt with. It may be dropped but cannot be cloned. Read more
type NegativeImbalance = NegativeImbalance<T, GetCurrencyId>
The opaque token type for an imbalance. This is returned by unbalanced operations and must be dealt with. It may be dropped but cannot be cloned. Read more
fn total_balance(who: &T::AccountId) -> Self::Balance
[src]
fn can_slash(who: &T::AccountId, value: Self::Balance) -> bool
[src]
fn total_issuance() -> Self::Balance
[src]
fn minimum_balance() -> Self::Balance
[src]
fn burn(amount: Self::Balance) -> Self::PositiveImbalance
[src]
Reduce the total issuance of Dinar when Bought with SettCurrencies by amount
and return the according imbalance. The imbalance will
typically be used to reduce an account by the same amount with e.g. settle
.
This is infallible, but doesn’t guarantee that the entire amount
is burnt, for example
in the case of underflow.
fn issue(amount: Self::Balance) -> Self::NegativeImbalance
[src]
Increase the total issuance of Dinar when Sold for SettCurrencies by amount
and return the according imbalance. The imbalance
will typically be used to increase an account by the same amount with e.g.
resolve_into_existing
or resolve_creating
.
This is infallible, but doesn’t guarantee that the entire amount
is issued, for example
in the case of overflow.
fn free_balance(who: &T::AccountId) -> Self::Balance
[src]
fn ensure_can_withdraw(
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons,
_new_balance: Self::Balance
) -> DispatchResult
[src]
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons,
_new_balance: Self::Balance
) -> DispatchResult
fn transfer(
source: &T::AccountId,
dest: &T::AccountId,
value: Self::Balance,
_existence_requirement: ExistenceRequirement
) -> DispatchResult
[src]
source: &T::AccountId,
dest: &T::AccountId,
value: Self::Balance,
_existence_requirement: ExistenceRequirement
) -> DispatchResult
fn slash(
who: &T::AccountId,
value: Self::Balance
) -> (Self::NegativeImbalance, Self::Balance)
[src]
who: &T::AccountId,
value: Self::Balance
) -> (Self::NegativeImbalance, Self::Balance)
fn deposit_into_existing(
who: &T::AccountId,
value: Self::Balance
) -> Result<Self::PositiveImbalance, DispatchError>
[src]
who: &T::AccountId,
value: Self::Balance
) -> Result<Self::PositiveImbalance, DispatchError>
fn deposit_creating(
who: &T::AccountId,
value: Self::Balance
) -> Self::PositiveImbalance
[src]
who: &T::AccountId,
value: Self::Balance
) -> Self::PositiveImbalance
fn withdraw(
who: &T::AccountId,
value: Self::Balance,
_reasons: WithdrawReasons,
_liveness: ExistenceRequirement
) -> Result<Self::NegativeImbalance, DispatchError>
[src]
who: &T::AccountId,
value: Self::Balance,
_reasons: WithdrawReasons,
_liveness: ExistenceRequirement
) -> Result<Self::NegativeImbalance, DispatchError>
fn make_free_balance_be(
who: &T::AccountId,
value: Self::Balance
) -> SignedImbalance<Self::Balance, Self::PositiveImbalance>
[src]
who: &T::AccountId,
value: Self::Balance
) -> SignedImbalance<Self::Balance, Self::PositiveImbalance>
pub fn pair(
amount: Self::Balance
) -> (Self::PositiveImbalance, Self::NegativeImbalance)
[src]
amount: Self::Balance
) -> (Self::PositiveImbalance, Self::NegativeImbalance)
pub fn resolve_into_existing(
who: &AccountId,
value: Self::NegativeImbalance
) -> Result<(), Self::NegativeImbalance>
[src]
who: &AccountId,
value: Self::NegativeImbalance
) -> Result<(), Self::NegativeImbalance>
pub fn resolve_creating(who: &AccountId, value: Self::NegativeImbalance)
[src]
pub fn settle(
who: &AccountId,
value: Self::PositiveImbalance,
reasons: WithdrawReasons,
liveness: ExistenceRequirement
) -> Result<(), Self::PositiveImbalance>
[src]
who: &AccountId,
value: Self::PositiveImbalance,
reasons: WithdrawReasons,
liveness: ExistenceRequirement
) -> Result<(), Self::PositiveImbalance>
impl<T, GetCurrencyId> LockableCurrency<<T as Config>::AccountId> for CurrencyAdapter<T, GetCurrencyId> where
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
[src]
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
type Moment = T::BlockNumber
The quantity used to denote time; usually just a BlockNumber
.
type MaxLocks = ()
The maximum number of locks a user should have on their account.
fn set_lock(
id: LockIdentifier,
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons
)
[src]
id: LockIdentifier,
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons
)
fn extend_lock(
id: LockIdentifier,
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons
)
[src]
id: LockIdentifier,
who: &T::AccountId,
amount: Self::Balance,
_reasons: WithdrawReasons
)
fn remove_lock(id: LockIdentifier, who: &T::AccountId)
[src]
impl<T, GetCurrencyId> ReservableCurrency<<T as Config>::AccountId> for CurrencyAdapter<T, GetCurrencyId> where
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
[src]
T: Config,
GetCurrencyId: Get<T::CurrencyId>,
fn can_reserve(who: &T::AccountId, value: Self::Balance) -> bool
[src]
fn slash_reserved(
who: &T::AccountId,
value: Self::Balance
) -> (Self::NegativeImbalance, Self::Balance)
[src]
who: &T::AccountId,
value: Self::Balance
) -> (Self::NegativeImbalance, Self::Balance)
fn reserved_balance(who: &T::AccountId) -> Self::Balance
[src]
fn reserve(who: &T::AccountId, value: Self::Balance) -> DispatchResult
[src]
fn unreserve(who: &T::AccountId, value: Self::Balance) -> Self::Balance
[src]
fn repatriate_reserved(
slashed: &T::AccountId,
beneficiary: &T::AccountId,
value: Self::Balance,
status: Status
) -> Result<Self::Balance, DispatchError>
[src]
slashed: &T::AccountId,
beneficiary: &T::AccountId,
value: Self::Balance,
status: Status
) -> Result<Self::Balance, DispatchError>
Auto Trait Implementations
impl<T, GetCurrencyId> RefUnwindSafe for CurrencyAdapter<T, GetCurrencyId> where
GetCurrencyId: RefUnwindSafe,
T: RefUnwindSafe,
GetCurrencyId: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, GetCurrencyId> Send for CurrencyAdapter<T, GetCurrencyId> where
GetCurrencyId: Send,
T: Send,
GetCurrencyId: Send,
T: Send,
impl<T, GetCurrencyId> Sync for CurrencyAdapter<T, GetCurrencyId> where
GetCurrencyId: Sync,
T: Sync,
GetCurrencyId: Sync,
T: Sync,
impl<T, GetCurrencyId> Unpin for CurrencyAdapter<T, GetCurrencyId> where
GetCurrencyId: Unpin,
T: Unpin,
GetCurrencyId: Unpin,
T: Unpin,
impl<T, GetCurrencyId> UnwindSafe for CurrencyAdapter<T, GetCurrencyId> where
GetCurrencyId: UnwindSafe,
T: UnwindSafe,
GetCurrencyId: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Az for T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedAs for T
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
T: CheckedCast<Dst>,
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub 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]
pub fn from_ref(t: &T) -> &T
[src]
pub fn into_ref(&self) -> &T
[src]
pub fn from_mut(t: &mut T) -> &mut T
[src]
pub fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
Get a mutable reference to the inner from the outer.
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
pub fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
pub fn lossy_into(self) -> Dst
[src]
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> OverflowingAs for T
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
T: OverflowingCast<Dst>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> SaturatingAs for T
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
T: SaturatingCast<Dst>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
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.
pub 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.
pub 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>,
pub fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<T> UnwrappedAs for T
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
T: UnwrappedCast<Dst>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
impl<T> WrappingAs for T
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
T: WrappingCast<Dst>,