Struct mpl_token_auth_rules::state::Not
source · pub struct Not<'a> {
pub rule: RuleV2<'a>,
}Expand description
Constraint representing a negation, where the contained rule must fail.
Fields§
§rule: RuleV2<'a>The Rule contained under Not.
Implementations§
source§impl<'a> Not<'a>
impl<'a> Not<'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 Not<'a>
impl<'a> Constraint<'a> for Not<'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 Not<'a>
impl<'a> !Send for Not<'a>
impl<'a> !Sync for Not<'a>
impl<'a> Unpin for Not<'a>
impl<'a> !UnwindSafe for Not<'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