pub trait FieldRules {
// Required methods
fn check_rules(&self) -> ProgramResult;
fn check_account(account: &AccountView<'_>) -> ProgramResult;
}Expand description
A layout with value rules: #[check(..)] on a field of a
#[hopper::state] struct implements this.
Required Methods§
Sourcefn check_rules(&self) -> ProgramResult
fn check_rules(&self) -> ProgramResult
Check every rule against this value and return the first failure.
Sourcefn check_account(account: &AccountView<'_>) -> ProgramResult
fn check_account(account: &AccountView<'_>) -> ProgramResult
Load the layout from account and check its rules.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".