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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Trait abstracting over different random-number generator backends.
//!
//! `Rnd` and `Randomize` are implemented against this trait rather than a
//! single hardcoded generator, so a host can swap in a different backend:
//!
//! - **Classic** ([`ClassicBackend`](super::classic::ClassicBackend), the
//! default): reproduces VB6's own 24-bit linear congruential generator bit
//! for bit.
//! - **Playback** ([`PlaybackBackend`](super::playback::PlaybackBackend)):
//! replays a fixed, caller-supplied list of values, looping back to the
//! start once exhausted. Useful for deterministic tests and demos.
//! - **Modern** ([`ModernBackend`](super::modern::ModernBackend)): draws from
//! the `rand` crate's generator instead of VB6's LCG, for callers that want
//! better statistical quality and don't need bit-for-bit VB6 compatibility.
use crateVBVariant;
/// Abstraction over a random-number generator backing `Rnd` and `Randomize`.