Struct mpl_candy_guard::guards::AddressGate
source · pub struct AddressGate {
pub address: Pubkey,
}Expand description
Guard that restricts access to a specific address.
Fields§
§address: PubkeyTrait Implementations§
source§impl BorshDeserialize for AddressGatewhere
Pubkey: BorshDeserialize,
impl BorshDeserialize for AddressGatewhere
Pubkey: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for AddressGatewhere
Pubkey: BorshSerialize,
impl BorshSerialize for AddressGatewhere
Pubkey: BorshSerialize,
source§impl Clone for AddressGate
impl Clone for AddressGate
source§fn clone(&self) -> AddressGate
fn clone(&self) -> AddressGate
Returns a copy 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 AddressGate
impl Condition for AddressGate
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 AddressGate
impl Debug for AddressGate
source§impl Guard for AddressGate
impl Guard for AddressGate
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.
source§fn save(&self, data: &mut [u8], offset: usize) -> Result<()>
fn save(&self, data: &mut [u8], offset: usize) -> Result<()>
Serializes the guard into the specified data array.
Auto Trait Implementations§
impl RefUnwindSafe for AddressGate
impl Send for AddressGate
impl Sync for AddressGate
impl Unpin for AddressGate
impl UnwindSafe for AddressGate
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