pub enum RuleSetInstruction {
CreateOrUpdate(CreateOrUpdateArgs),
Validate(ValidateArgs),
WriteToBuffer(WriteToBufferArgs),
PuffRuleSet(PuffRuleSetArgs),
}
Expand description
Instructions available in this program.
Variants§
CreateOrUpdate(CreateOrUpdateArgs)
This instruction stores a caller-pre-serialized RuleSet
into the rule_set PDA account.
Validate(ValidateArgs)
This instruction executes the RuleSet stored in the rule_set PDA account by calling the
RuleSet
’s validate
method. If any of the Rules contained in the RuleSet have state
information (such as the Frequency rule’s last_update
time value), the optional accounts
must be provided in order to save the updated stated in the RuleSet state PDA. Note that
updating the state for a Rule requires that the rule_authority
signer matches the Pubkey
stored in the Rule.
WriteToBuffer(WriteToBufferArgs)
This instruction appends a pre-serialized RuleSet
chunk into the rule_set PDA account.
Needed with large RuleSet
s to stay within transaction size limit.
PuffRuleSet(PuffRuleSetArgs)
Add space to the end of a rule set account. Needed with large RuleSet
s to pre-allocate
the space, to stay within PDA allocation limits.
Trait Implementations§
Source§impl BorshDeserialize for RuleSetInstruction
impl BorshDeserialize for RuleSetInstruction
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for RuleSetInstruction
impl BorshSerialize for RuleSetInstruction
Source§impl Clone for RuleSetInstruction
impl Clone for RuleSetInstruction
Source§fn clone(&self) -> RuleSetInstruction
fn clone(&self) -> RuleSetInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RuleSetInstruction
impl Debug for RuleSetInstruction
Source§impl EnumExt for RuleSetInstruction
impl EnumExt for RuleSetInstruction
Auto Trait Implementations§
impl Freeze for RuleSetInstruction
impl RefUnwindSafe for RuleSetInstruction
impl Send for RuleSetInstruction
impl Sync for RuleSetInstruction
impl Unpin for RuleSetInstruction
impl UnwindSafe for RuleSetInstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more