rit 0.1.3

Bit operation for rust.
Documentation
  • Coverage
  • 0%
    0 out of 6 items documented0 out of 0 items with examples
  • Size
  • Source code size: 5.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.11 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • RuoqingHe

Package rit

Package rit is a bit operation lib for rust. It gives 4 marcos for get, set and reset a bit for any number type.

[dependencies]
rit = "0.1"

Examples

fn main() {
    assert_eq!(rit::eq1!(0b0000_1111, 0), true);
    assert_eq!(rit::eq0!(0b0000_1111, 4), true);
    assert_eq!(rit::set!(0b0000_1111, 0), 0x0f);
    assert_eq!(rit::clr!(0b0000_1111, 0), 0x0e);
}