1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#![no_std] /// An object-safe part of the LFSR trait that allow to count up, down and to get a current state pub trait LFSR { /** Retrieves the current state of the LFSR */ fn get_state(&self) -> u32; /** Count up */ fn inc(&mut self); /** Count down */ fn dec(&mut self); } /// A non-object-safe part of an LFSR pub trait LFSRStatic { /** Sequence length of this LFSR */ fn sequence_length() -> u32; }