cruiser 0.2.0

Solana code generation
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::account_argument::AccountArgument;
use crate::CruiserResult;
use solana_program::pubkey::Pubkey;

/// Validates this argument using data `Arg`. The seconds step in the instruction lifecycle.
pub trait ValidateArgument<Arg>: Sized + AccountArgument {
    /// Runs validation on this account with data `Arg`.
    ///
    /// Ordering for wrapping should be to call `validate` on the wrapped type first.
    fn validate(&mut self, program_id: &Pubkey, arg: Arg) -> CruiserResult<()>;
}