Trait cfg_traits::PoolInspect
source · pub trait PoolInspect<AccountId, CurrencyId> {
type PoolId;
type TrancheId;
type Moment;
// Required methods
fn pool_exists(pool_id: Self::PoolId) -> bool;
fn tranche_exists(
pool_id: Self::PoolId,
tranche_id: Self::TrancheId
) -> bool;
fn account_for(pool_id: Self::PoolId) -> AccountId;
fn currency_for(pool_id: Self::PoolId) -> Option<CurrencyId>;
}
Expand description
A trait that support pool inspection operations such as pool existence checks and pool admin of permission set.
Required Associated Types§
Required Methods§
sourcefn pool_exists(pool_id: Self::PoolId) -> bool
fn pool_exists(pool_id: Self::PoolId) -> bool
Check if the pool exists
sourcefn tranche_exists(pool_id: Self::PoolId, tranche_id: Self::TrancheId) -> bool
fn tranche_exists(pool_id: Self::PoolId, tranche_id: Self::TrancheId) -> bool
Check if the tranche exists for the given pool
sourcefn account_for(pool_id: Self::PoolId) -> AccountId
fn account_for(pool_id: Self::PoolId) -> AccountId
Get the account used for the given pool_id
.
sourcefn currency_for(pool_id: Self::PoolId) -> Option<CurrencyId>
fn currency_for(pool_id: Self::PoolId) -> Option<CurrencyId>
Get the currency used for the given pool_id
.
Object Safety§
This trait is not object safe.