Enum solana_budget_program::budget_expr::BudgetExpr[][src]

#[repr(C)]
pub enum BudgetExpr {
    Pay(Payment),
    After(Condition, Box<BudgetExpr>),
    Or((Condition, Box<BudgetExpr>), (Condition, Box<BudgetExpr>)),
    And(Condition, Condition, Box<BudgetExpr>),
}
Expand description

A data type representing a payment plan.

Variants

Pay

Make a payment.

Tuple Fields of Pay

0: Payment
After

Make a payment after some condition.

Tuple Fields of After

0: Condition1: Box<BudgetExpr>
Or

Either make a payment after one condition or a different payment after another condition, which ever condition is satisfied first.

Tuple Fields of Or

0: (Condition, Box<BudgetExpr>)1: (Condition, Box<BudgetExpr>)
And

Make a payment after both of two conditions are satisfied

Tuple Fields of And

0: Condition1: Condition2: Box<BudgetExpr>

Implementations

Create the simplest budget - one that pays lamports to Pubkey.

Create a budget that pays lamports to to after being witnessed by from.

Create a budget that pays lamports to to after witnessing account data in account_pubkey with the given hash.

Create a budget that pays lamports to to after being witnessed by witness unless canceled with a signature from from.

Create a budget that pays lamportstotoafter being witnessed by 2xfrom`s

Create a budget that pays lamports to to after the given DateTime signed by dt_pubkey.

Create a budget that pays lamports to to after the given DateTime signed by dt_pubkey unless canceled by from.

Return Payment if the budget requires no additional Witnesses.

Return true if the budget spends exactly spendable_lamports.

Apply a witness to the budget to see if the budget can be reduced. If so, modify the budget in-place.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.