pub struct CoreBankingState {
pub config: CoreBankingConfig,
pub records: HashMap<String, CreditRecord>,
pub stats: SimulatorStats,
pub started_at: Instant,
pub ready: bool,
pub dataset_seed: Option<u64>,
pub dataset_dirty_ratio: f64,
}Expand description
Internal state for Core Banking Simulator
Fields§
§config: CoreBankingConfig§records: HashMap<String, CreditRecord>§stats: SimulatorStats§started_at: Instant§ready: bool§dataset_seed: Option<u64>§dataset_dirty_ratio: f64Implementations§
Source§impl CoreBankingState
impl CoreBankingState
pub fn new(config: CoreBankingConfig) -> Self
Sourcepub fn generate_records(
count: u32,
dirty_ratio: f64,
seed: Option<u64>,
start_id: u64,
) -> Vec<CreditRecord>
pub fn generate_records( count: u32, dirty_ratio: f64, seed: Option<u64>, start_id: u64, ) -> Vec<CreditRecord>
Generate records based on configuration
Auto Trait Implementations§
impl Freeze for CoreBankingState
impl RefUnwindSafe for CoreBankingState
impl Send for CoreBankingState
impl Sync for CoreBankingState
impl Unpin for CoreBankingState
impl UnsafeUnpin for CoreBankingState
impl UnwindSafe for CoreBankingState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more