Copypasta enums_classes.rs from rust-random over