Rust only has safe unions, so interoperating with C unions is ugly. One approach to this 'unsafe enums' is proposed in https://github.com/rust-lang/rfcs/pull/724.