instruction_decoder_collection_fast

Macro instruction_decoder_collection_fast 

Source
instruction_decoder_collection_fast!() { /* proc-macro */ }
Expand description

Similar to instruction_decoder_collection! but dispatches by program_id via match for faster decoding.

Syntax

instruction_decoder_collection_fast!(
    AllInstructionsEnum,
    AllInstructionTypesEnum,
    AllProgramsEnum,
    // 4-part (preferred): Variant => ProgramIdPath => DecoderExpr => InstructionTypePath
    Pumpfun => carbon_pumpfun_decoder::PROGRAM_ID => carbon_pumpfun_decoder::PumpfunDecoder => carbon_pumpfun_decoder::instructions::PumpfunInstruction,
    // 3-part (legacy): falls back to slow sequential decode
    PumpSwap => carbon_pump_swap_decoder::PumpSwapDecoder => carbon_pump_swap_decoder::instructions::PumpSwapInstruction,
);