use super::sim_rng::SimRng;
use rand::{Error, RngCore, SeedableRng};
const N: usize = 64;
#[derive(Debug)]
pub struct CyclicSeed(pub [u8; N]);
impl Default for CyclicSeed {
#[inline]
fn default() -> Self {
Self([0; N])
}
}
impl AsMut<[u8]> for CyclicSeed {
#[inline]
fn as_mut(&mut self) -> &mut [u8] {
&mut self.0
}
}
#[allow(unused)]
#[derive(Debug)]
pub struct CyclicRng {
seed: CyclicSeed,
bools: Vec<bool>,
}
impl CyclicRng {
#[allow(dead_code)]
#[inline]
fn set_bools(&mut self, bools: &[bool]) {
bools.clone_into(&mut self.bools);
}
}
impl RngCore for CyclicRng {
#[allow(unused)]
#[inline]
fn next_u32(&mut self) -> u32 {
todo!()
}
#[allow(unused)]
#[inline]
fn next_u64(&mut self) -> u64 {
todo!()
}
#[allow(unused)]
#[inline]
fn fill_bytes(&mut self, dest: &mut [u8]) {
todo!()
}
#[allow(unused)]
#[inline]
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> {
todo!()
}
}
impl SeedableRng for CyclicRng {
type Seed = CyclicSeed;
#[inline]
fn from_seed(seed: Self::Seed) -> Self {
Self {
seed,
bools: vec![],
}
}
}
impl SimRng for CyclicRng {}