pub trait ExtSize {
    const EXT_SIZE: usize;
    const EXT_BITS: u32;
}
Expand description

This trait helps define the size of the extension of the PCG generator this allows the size of the extension to effectively be part of the type of the extended generator.

These extensions have to be a power of two based on the way the generator utilizes its extension. This could be made much better with associated constants and constant functions, or by type level numbers.

Already provided are:

  • Ext2
  • Ext4
  • Ext8
  • Ext16
  • Ext32
  • Ext64
  • Ext128
  • Ext256
  • Ext512
  • Ext1024 Bigger extensions can be produced and dropped as long as they are powers of 2

Required Associated Constants

Implementors