#[repr(u32)]pub enum ConstraintType {
Show 17 variants
Uninitialized = 0,
AdditionalSigner = 1,
All = 2,
Amount = 3,
Any = 4,
Frequency = 5,
IsWallet = 6,
Namespace = 7,
Not = 8,
Pass = 9,
PDAMatch = 10,
ProgramOwned = 11,
ProgramOwnedList = 12,
ProgramOwnedTree = 13,
PubkeyListMatch = 14,
PubkeyMatch = 15,
PubkeyTreeMatch = 16,
}Expand description
The struct containing every type of Rule and its associated data.
Variants§
Uninitialized = 0
Indicates that the contraint is uninitialized.
AdditionalSigner = 1
An additional signer must be present.
All = 2
Group AND, where every rule contained must pass.
Amount = 3
Comparison against the amount of tokens being transferred.
Any = 4
Group OR, where at least one rule contained must pass.
Frequency = 5
Comparison based on time between operations.
IsWallet = 6
The true test if a pubkey can be signed from a client and therefore is a true wallet account.
Namespace = 7
A rule that tells the operation finder to use the default namespace rule.
Not = 8
Negation, where the contained rule must fail.
Pass = 9
An operation that always succeeds.
PDAMatch = 10
A resulting PDA derivation of seeds must prove the account is a PDA.
ProgramOwned = 11
The Pubkey must be owned by a given program. When the Validate instruction is called,
this rule requires a PayloadType value of PayloadType::Pubkey.
ProgramOwnedList = 12
The Pubkey must be owned by a program in the list of Pubkeys.
ProgramOwnedTree = 13
The Pubkey must be owned by a member of the Merkle tree in the rule.
PubkeyListMatch = 14
The comparing Pubkey must be in the list of Pubkeys.
PubkeyMatch = 15
Direct comparison between Pubkeys. When the Validate instruction is called, this rule
requires a PayloadType value of PayloadType::Pubkey.
PubkeyTreeMatch = 16
The comparing Pubkey must be a member of the Merkle tree in the rule.
Implementations§
source§impl ConstraintType
impl ConstraintType
sourcepub fn to_error(&self) -> ProgramError
pub fn to_error(&self) -> ProgramError
Convert the rule to a corresponding error resulting from the rule failure.
Trait Implementations§
source§impl Clone for ConstraintType
impl Clone for ConstraintType
source§fn clone(&self) -> ConstraintType
fn clone(&self) -> ConstraintType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more