pub struct Instruction {
pub name: String,
pub params: Vec<InstructionParam>,
pub returns: Option<SolanaType>,
pub body: Vec<Statement>,
pub is_public: bool,
pub is_view: bool,
pub is_payable: bool,
pub uses_token_program: bool,
pub uses_sol_transfer: bool,
pub modifiers: Vec<ModifierCall>,
pub mapping_accesses: Vec<MappingAccess>,
pub closes_state: bool,
}Expand description
An instruction (function) in the program
Fields§
§name: String§params: Vec<InstructionParam>§returns: Option<SolanaType>§body: Vec<Statement>§is_public: bool§is_view: bool§is_payable: bool§uses_token_program: bool§uses_sol_transfer: bool§modifiers: Vec<ModifierCall>§mapping_accesses: Vec<MappingAccess>Mapping accesses needed for this instruction
closes_state: boolIf true, this instruction closes the state account (selfdestruct)
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
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 moreAuto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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