AccountValidator

Trait AccountValidator 

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

Source

fn validate_account(&self, account: &Account) -> LedgerResult<()>

Validate an account before saving

Source

fn validate_account_deletion(&self, account_id: &str) -> LedgerResult<()>

Validate account deletion (e.g., check for existing transactions)

Implementors§