1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use datasize::DataSize; use serde::{Deserialize, Serialize}; /// Configuration options for fetching. #[derive(Copy, Clone, DataSize, Debug, Deserialize, Serialize)] pub struct Config { verify_accounts: bool, } impl Config { /// Constructor for deploy_acceptor config. pub fn new(verify_accounts: bool) -> Self { Config { verify_accounts } } /// Get verify_accounts setting. pub(crate) fn verify_accounts(&self) -> bool { self.verify_accounts } } impl Default for Config { fn default() -> Self { Config { verify_accounts: true, } } }