pub enum PoolFunding {
Granted,
Purchased,
Subscription,
Unknown,
}Expand description
Where a pool’s balance came from, which decides what a consumer may promise.
Variants§
Granted
Given by the provider: a promotion, a trial grant, a voucher. Spendable without a bill.
Purchased
Bought. Spending it costs money.
Subscription
Included in a subscription the account already pays for.
Unknown
The provider separates this pool but does not say what funds it, or the producer named a funding kind this consumer does not recognise.
A correct answer rather than a failure one: some providers name their pools without defining them, and guessing the funding is how a consumer ends up spending money it meant to protect.
It is also the deserialization fallback, and the two meanings genuinely
agree — a funding kind added after this consumer was built is, to this
consumer, of unknown funding. Without the fallback an unrecognised value
fails the whole ProviderUsage entry rather than this one field, so a
new pool kind would take an account’s usage down with it and read as
the provider being unavailable.