pub trait AccountValidator: Send + Sync {
// Required methods
fn validate_account(&self, account: &Account) -> LedgerResult<()>;
fn validate_account_deletion(&self, account_id: &str) -> LedgerResult<()>;
}
Expand description
Trait for implementing custom account validation rules
Required Methods§
Sourcefn validate_account(&self, account: &Account) -> LedgerResult<()>
fn validate_account(&self, account: &Account) -> LedgerResult<()>
Validate an account before saving
Sourcefn validate_account_deletion(&self, account_id: &str) -> LedgerResult<()>
fn validate_account_deletion(&self, account_id: &str) -> LedgerResult<()>
Validate account deletion (e.g., check for existing transactions)