pub struct InstructionDef {
pub name: String,
pub discriminator: Vec<u8>,
pub discriminator_size: usize,
pub accounts: Vec<InstructionAccountDef>,
pub args: Vec<InstructionArgDef>,
pub errors: Vec<IdlErrorSnapshot>,
pub program_id: Option<String>,
pub docs: Vec<String>,
}Expand description
Full instruction definition in the AST.
Fields§
§name: StringInstruction name (e.g., “buy”, “sell”, “automate”)
discriminator: Vec<u8>Discriminator bytes (8 bytes for Anchor, 1 byte for Steel)
discriminator_size: usizeSize of discriminator in bytes (for buffer allocation)
accounts: Vec<InstructionAccountDef>Accounts required by this instruction, in order
args: Vec<InstructionArgDef>Arguments for this instruction, in order
errors: Vec<IdlErrorSnapshot>Error definitions specific to this instruction
program_id: Option<String>Program ID for this instruction (usually same as stack’s programId)
docs: Vec<String>Documentation from IDL
Trait Implementations§
Source§impl Clone for InstructionDef
impl Clone for InstructionDef
Source§fn clone(&self) -> InstructionDef
fn clone(&self) -> InstructionDef
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 Debug for InstructionDef
impl Debug for InstructionDef
Source§impl<'de> Deserialize<'de> for InstructionDef
impl<'de> Deserialize<'de> for InstructionDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InstructionDef
impl PartialEq for InstructionDef
Source§impl Serialize for InstructionDef
impl Serialize for InstructionDef
impl StructuralPartialEq for InstructionDef
Auto Trait Implementations§
impl Freeze for InstructionDef
impl RefUnwindSafe for InstructionDef
impl Send for InstructionDef
impl Sync for InstructionDef
impl Unpin for InstructionDef
impl UnwindSafe for InstructionDef
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