scv

Crates.ioscv
lib.rsscv
version0.1.2
created_at2025-11-04 09:05:24.995629+00
updated_at2025-11-04 09:08:07.942356+00
descriptionA Rust procedural macro
homepage
repositoryhttps://github.com/bankusy/scv-rs
max_upload_size
id1915986
size4,635
dlworhd (dlworhd)

documentation

README

scv

A Rust procedural macro that enables bitwise operations on enums.

Installation

Add this to your Cargo.toml:

[dependencies]
scv = "0.1.0"

Usage

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);
}

License

This project is licensed under MIT OR Apache-2.0.

Commit count: 0

cargo fmt