pub struct ProgramGate {
pub additional: Vec<Pubkey>,
}Expand description
Guard that restricts the programs that can be in a mint transaction. The guard allows the necessary programs for the mint and any other program specified in the configuration.
Fields§
§additional: Vec<Pubkey>Trait Implementations§
Source§impl BorshDeserialize for ProgramGate
impl BorshDeserialize for ProgramGate
Source§impl BorshSerialize for ProgramGate
impl BorshSerialize for ProgramGate
Source§impl Clone for ProgramGate
impl Clone for ProgramGate
Source§fn clone(&self) -> ProgramGate
fn clone(&self) -> ProgramGate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Condition for ProgramGate
impl Condition for ProgramGate
Source§fn validate<'info>(
&self,
ctx: &mut EvaluationContext<'_, '_, '_>,
_guard_set: &GuardSet,
_mint_args: &[u8],
) -> Result<()>
fn validate<'info>( &self, ctx: &mut EvaluationContext<'_, '_, '_>, _guard_set: &GuardSet, _mint_args: &[u8], ) -> Result<()>
Validate the condition of the guard. When the guard condition is
not satisfied, it will return an error. Read more
Source§fn pre_actions(
&self,
_ctx: &mut EvaluationContext<'_, '_, '_>,
_guard_set: &GuardSet,
_mint_args: &[u8],
) -> Result<()>
fn pre_actions( &self, _ctx: &mut EvaluationContext<'_, '_, '_>, _guard_set: &GuardSet, _mint_args: &[u8], ) -> Result<()>
Perform the action associated with the guard before the CPI
mint instruction. Read moreSource§fn post_actions(
&self,
_ctx: &mut EvaluationContext<'_, '_, '_>,
_guard_set: &GuardSet,
_mint_args: &[u8],
) -> Result<()>
fn post_actions( &self, _ctx: &mut EvaluationContext<'_, '_, '_>, _guard_set: &GuardSet, _mint_args: &[u8], ) -> Result<()>
Perform the action associated with the guard after the CPI
mint instruction. Read moreSource§impl Debug for ProgramGate
impl Debug for ProgramGate
Source§impl Guard for ProgramGate
impl Guard for ProgramGate
Source§fn verify(data: &CandyGuardData) -> Result<()>
fn verify(data: &CandyGuardData) -> Result<()>
Verifies that the candy guard configuration is valid according to the rules
of the guard.
Source§fn instruction<'info>(
_ctx: &Context<'_, '_, '_, 'info, Route<'info>>,
_route_context: RouteContext<'info>,
_data: Vec<u8>,
) -> Result<()>
fn instruction<'info>( _ctx: &Context<'_, '_, '_, 'info, Route<'info>>, _route_context: RouteContext<'info>, _data: Vec<u8>, ) -> Result<()>
Executes an instruction. This function is called from the
route instruction
handler.Source§fn is_enabled(features: u64) -> bool
fn is_enabled(features: u64) -> bool
Returns whether the guards is enabled or not on the specified features.
Auto Trait Implementations§
impl Freeze for ProgramGate
impl RefUnwindSafe for ProgramGate
impl Send for ProgramGate
impl Sync for ProgramGate
impl Unpin for ProgramGate
impl UnwindSafe for ProgramGate
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
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> ⓘ
Converts
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> ⓘ
Converts
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