Struct mpl_token_auth_rules::state::constraint::Any
source · pub struct Any<'a> {
pub size: &'a u64,
pub rules: Vec<RuleV2<'a>>,
}Expand description
Constraint representing a group OR, where at least one rule contained must pass.
Fields§
§size: &'a u64The number of rules contained under Any.
rules: Vec<RuleV2<'a>>The vector of Rules contained under Any.
Implementations§
source§impl<'a> Any<'a>
impl<'a> Any<'a>
sourcepub fn from_bytes(bytes: &'a [u8]) -> Result<Self, RuleSetError>
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self, RuleSetError>
Deserialize a constraint from a byte array.
Trait Implementations§
source§impl<'a> Constraint<'a> for Any<'a>
impl<'a> Constraint<'a> for Any<'a>
source§fn constraint_type(&self) -> ConstraintType
fn constraint_type(&self) -> ConstraintType
Returns the type of the constraint.
source§fn validate(
&self,
accounts: &HashMap<Pubkey, &AccountInfo<'_>>,
payload: &Payload,
update_rule_state: bool,
rule_set_state_pda: &Option<&AccountInfo<'_>>,
rule_authority: &Option<&AccountInfo<'_>>
) -> RuleResult
fn validate( &self, accounts: &HashMap<Pubkey, &AccountInfo<'_>>, payload: &Payload, update_rule_state: bool, rule_set_state_pda: &Option<&AccountInfo<'_>>, rule_authority: &Option<&AccountInfo<'_>> ) -> RuleResult
Validates the constraint condition.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Any<'a>
impl<'a> !Send for Any<'a>
impl<'a> !Sync for Any<'a>
impl<'a> Unpin for Any<'a>
impl<'a> !UnwindSafe for Any<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more