| Crates.io | bitstates |
| lib.rs | bitstates |
| version | 0.1.0 |
| created_at | 2025-11-04 17:53:19.855455+00 |
| updated_at | 2025-11-04 17:53:19.855455+00 |
| description | Reactive bit state management with event callbacks |
| homepage | https://github.com/skandrk/bit_states |
| repository | https://github.com/skandrk/bit_states |
| max_upload_size | |
| id | 1916693 |
| size | 28,771 |
dry run publish
Reactive bit state management with event callbacks for Rust.
[dependencies]
bitstates = "0.1.0"
use bitstates::BitState;
#[derive(BitState)]
#[repr(u8)]
enum Status {
Ready = 0,
Active = 1,
}
fn main() {
let mut status = StatusSet::new(
|flag| println!("SET: {:?}", flag),
|flag| println!("CLEARED: {:?}", flag),
);
status.set_with_state(0b01);
}
MIT OR Apache-2.0