pub trait ValidateAccount {
// Required method
fn validate(&self) -> Result<(), ProgramError>;
}Expand description
Trait for accounts that can self-validate.
Automatically satisfied by construction for modifier-wrapped types. Useful for custom account implementations that need a post-construction validation pass.
Required Methods§
Sourcefn validate(&self) -> Result<(), ProgramError>
fn validate(&self) -> Result<(), ProgramError>
Run all validation checks. Returns Ok(()) if valid.