Trait InstructionDecoder

Source
pub trait InstructionDecoder<'a> {
    type InstructionType;

    // Required method
    fn decode_instruction(
        &self,
        instruction: &'a Instruction,
    ) -> Option<DecodedInstruction<Self::InstructionType>>;
}
Expand description

A trait for decoding Solana instructions into a structured type.

Implement the InstructionDecoder trait for types that can decode raw instructions into a more meaningful structure, providing application-specific logic.

§Type Parameters

  • InstructionType: The type into which the instruction data will be decoded.

§Required Methods

  • decode_instruction: Decodes a raw Solana Instruction into a DecodedInstruction.

Required Associated Types§

Required Methods§

Implementors§