Skip to content

skandrk/bit_states

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dry run publish

bitstates

Reactive bit state management with event callbacks for Rust.

Installation

[dependencies]
bitstates = "0.1.0"

Example

use bitstates::BitStates;

#[derive(BitStates)]
#[repr(u8)]
enum Status {
    Ready = 0,
    Active = 1,
}

fn main() {
    let mut status = StatusStates::new(
        |flag| println!("SET: {:?}", flag),
        |flag| println!("CLEARED: {:?}", flag),
    );

    status.set_with_state(0b01);
}

License

MIT OR Apache-2.0

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages