| Crates.io | scv |
| lib.rs | scv |
| version | 0.1.2 |
| created_at | 2025-11-04 09:05:24.995629+00 |
| updated_at | 2025-11-04 09:08:07.942356+00 |
| description | A Rust procedural macro |
| homepage | |
| repository | https://github.com/bankusy/scv-rs |
| max_upload_size | |
| id | 1915986 |
| size | 4,635 |
A Rust procedural macro that enables bitwise operations on enums.
Add this to your Cargo.toml:
[dependencies]
scv = "0.1.0"
Use the #[derive(scv)] attribute on enums to enable bitwise operations:
use scv::scv;
use std::ops::BitOr;
#[derive(scv)]
enum Permission {
Read = 0x110,
Write = 0x101,
Exec = 0x001,
}
fn main() {
let x = Permission::Read | Permission::Write;
println!("{}", x);
}
This project is licensed under MIT OR Apache-2.0.