Struct mpl_token_auth_rules::state::RuleSetV2
source · pub struct RuleSetV2<'a> {
pub owner: &'a Pubkey,
pub rule_set_name: &'a Str32,
pub operations: &'a [Str32],
pub rules: Vec<RuleV2<'a>>,
/* private fields */
}Expand description
The struct containing all Rule Set data, most importantly the map of operations to Rules.
See top-level module for description of PDA memory layout.
Fields§
§owner: &'a PubkeyOwner (creator) of the RuleSet.
rule_set_name: &'a Str32Name of the RuleSet, used in PDA derivation.
operations: &'a [Str32]Operations available.
rules: Vec<RuleV2<'a>>Rules for each operation.
Implementations§
source§impl<'a> RuleSetV2<'a>
impl<'a> RuleSetV2<'a>
sourcepub fn from_bytes(bytes: &'a [u8]) -> Result<Self, RuleSetError>
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self, RuleSetError>
Deserialize a RuleSetV2 from a byte array.
Trait Implementations§
source§impl<'a> RuleSet<'a> for RuleSetV2<'a>
impl<'a> RuleSet<'a> for RuleSetV2<'a>
source§fn get_rule(
&self,
operation: String
) -> Result<&dyn Assertable<'a>, ProgramError>
fn get_rule( &self, operation: String ) -> Result<&dyn Assertable<'a>, ProgramError>
This function returns the rule for an operation by recursively searching through fallbacks
source§fn lib_version(&self) -> u8
fn lib_version(&self) -> u8
Returns the version of the
RuleSet.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RuleSetV2<'a>
impl<'a> !Send for RuleSetV2<'a>
impl<'a> !Sync for RuleSetV2<'a>
impl<'a> Unpin for RuleSetV2<'a>
impl<'a> !UnwindSafe for RuleSetV2<'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