https://github.com/rust-nvml/wrapcenum-derive
Not for general use
https://github.com/rust-nvml/wrapcenum-derive
Last synced: 6 months ago
JSON representation
Not for general use
- Host: GitHub
- URL: https://github.com/rust-nvml/wrapcenum-derive
- Owner: rust-nvml
- License: apache-2.0
- Created: 2017-05-17T04:18:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-10T06:20:01.000Z (over 2 years ago)
- Last Synced: 2025-03-30T23:52:58.115Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# wrapcenum-derive
Internal macro used in [nvml-wrapper](https://github.com/Cldfire/nvml-wrapper).
This macro is tied to the crate and is not meant for use by the general public.
Its purpose is to auto-generate both a `TryFrom` implementation converting an `i32`
into a Rust enum (specifically for converting a C enum represented as an integer that
has come over FFI) and an `as_c` method for converting the Rust enum back into an `i32`.
It wouldn't take much effort to turn this into something usable by others; if you're
interested feel free to contribute or file an issue asking me to put some work into it.
#### License
Licensed under either of Apache License, Version
2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.