wrapcenum-derive

Crates.iowrapcenum-derive
lib.rswrapcenum-derive
version0.4.1
sourcesrc
created_at2017-05-17 17:03:17.228694
updated_at2024-02-10 06:11:57.972739
descriptionDerive macro for nvml-wrapper, not for general use
homepage
repositoryhttps://github.com/Cldfire/wrapcenum-derive
max_upload_size
id14944
size20,253
Jarek Samic (Cldfire)

documentation

README

wrapcenum-derive

Internal macro used in 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.
Commit count: 12

cargo fmt