pub struct Pool {
pub id: String,
pub label: String,
pub funding: PoolFunding,
pub remaining: Option<Amount>,
pub total: Option<Amount>,
pub basis: PoolBasis,
pub spendable: Option<bool>,
}Expand description
A prepaid balance or credit pool on an account.
Plural by necessity: one figure cannot express “9.50 granted and 40 purchased”, which is exactly the distinction a consumer needs to spend the first without spending the second.
Fields§
§id: StringThe provider’s own name for this pool, never one invented here.
Providers separate pools without always defining them — a wallet may list
voucher, cash and credit balances and document none of them. Passing the
provider’s name through lets a consumer decide; renaming one granted
would be inventing the label a spend policy keys on.
label: StringHuman-readable name for display.
funding: PoolFundingWhat funds this pool.
remaining: Option<Amount>What is left, when it can be established.
total: Option<Amount>The pool’s size, when the provider reports one.
basis: PoolBasisHow remaining was obtained. Read it before acting on remaining.
spendable: Option<bool>Whether the provider says this pool may currently be drawn on.
Read from the provider, never inferred from remaining > 0: a pool can
be non-empty and closed, which several providers publish directly through
their own enable flags. Absent means the provider does not say.