pub trait HopperIx<'a>: Sized {
type Accounts: HopperAccounts<'a>;
type Args;
// Required method
fn parse_args(data: &'a [u8]) -> Result<Self::Args, ProgramError>;
}Expand description
Trait defining a Hopper instruction.
Combines argument parsing with account construction into a single
instruction definition. Used with hopper_entry() for typed dispatch.
Required Associated Types§
Sourcetype Accounts: HopperAccounts<'a>
type Accounts: HopperAccounts<'a>
The account struct for this instruction.
Required Methods§
Sourcefn parse_args(data: &'a [u8]) -> Result<Self::Args, ProgramError>
fn parse_args(data: &'a [u8]) -> Result<Self::Args, ProgramError>
Parse instruction arguments from raw data (after dispatch tag).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.