(391): Avoid undefined behavior casting opaque pointers to empty enums

Looks like enums had been the recommended way to do this kind of
thing, in the rustbooks itself, but it can lead to UB and it was
changed recently to reflect this.

The new recommendation is a repr(c) struct with a single private
field.

Close #391
7 jobs for <span class="ref-name">ub-enums</span> in 47 minutes and 18 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #162312
fedora test

00:11:57

 
  Lint
manual #162314
allowed to fail manual
clippy
passed #162313
rustfmt

00:02:55

passed #162315
tarball

00:19:13

 
  Cross Distro
passed #162318
debian_i386:testing

00:16:04

passed #162317
debian:testing

00:15:45

passed #162316
fedora:rawhide

00:15:24