Skip to main content

ValidateAccount

Trait ValidateAccount 

Source
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§

Source

fn validate(&self) -> Result<(), ProgramError>

Run all validation checks. Returns Ok(()) if valid.

Implementors§