1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#![no_std] mod catalog; pub use catalog::*; pub trait Width {} impl Width for u8 {} impl Width for u16 {} impl Width for u32 {} impl Width for u64 {} pub struct Algorithm<W: Width> { pub poly: W, pub init: W, pub refin: bool, pub refout: bool, pub xorout: W, pub check: W, pub residue: W, }