#enums #fake #type #byte #reinterpreted

fake-enum

A rust crate for creating FFI safe "fake" enum types

3 releases

0.1.4 Aug 9, 2021
0.1.3 Aug 9, 2021
0.1.2 Feb 11, 2021
0.1.1 Feb 4, 2021
0.1.0 Jan 11, 2021

#2651 in Rust patterns

Download history 5/week @ 2023-11-25 7/week @ 2023-12-02 24/week @ 2023-12-09 13/week @ 2023-12-16 9/week @ 2023-12-23 16/week @ 2023-12-30 17/week @ 2024-01-06 50/week @ 2024-01-13 63/week @ 2024-01-20 30/week @ 2024-01-27 6/week @ 2024-02-10 18/week @ 2024-02-17 28/week @ 2024-02-24 23/week @ 2024-03-02 32/week @ 2024-03-09

103 downloads per month
Used in 4 crates

MIT AND Apache-2.0

77KB
821 lines

Rust Fake Enums

A small library that allows you to declare "fake" enums, which can be safely used with FFI, or reinterpreted from bytes sourced from a user-controlled input.

License

Copyright (C) 2021 Connor Horman

This repository is dual licensed under the terms of the MIT and Apachev2 license. If you deal in the software, you must comply with the terms of both licenses.

Any contributions intentionally submitted by you for inclusion in this repository must be dual licensed as above.


lib.rs:

Support for fake enum types, that act like rust enums, but all values of the underlying type are accepted as values. See the macro fake_enum for details. The type of an elf file The type of an Nbt Tag

No runtime deps