Platform Tools Release 35.0.1 (11580240)
Generate rules.mk for bit_field crate

Generated by `cargo2rulesmk.py --run`.

Change-Id: Ic35ce1f1843feba6261021a2c04a49a389fdfa85
1 file changed
tree: c4e9f1fc0adc0b7045b62ff9489a7b6b76e22952
  1. benches/
  2. src/
  3. .cargo_vcs_info.json
  4. .gitignore
  5. .travis.yml
  6. Cargo.toml
  7. Cargo.toml.orig
  8. Changelog.md
  9. LICENSE
  10. LICENSE-APACHE
  11. LICENSE-MIT
  12. METADATA
  13. MODULE_LICENSE_APACHE2
  14. OWNERS
  15. README.md
  16. rules.mk
README.md

bit_field

A simple crate which provides the BitField trait, which provides methods for operating on individual bits and ranges of bits on Rust's integral types.

Documentation

Documentation is available on docs.rs

Usage

[dependencies]
bit_field = "0.10.1"

Example

extern crate bit_field;
use bit_field::BitField;

let mut x: u8 = 0;

x.set_bit(7, true);
assert_eq!(x, 0b1000_0000);

x.set_bits(0..4, 0b1001);
assert_eq!(x, 0b1000_1001);

License

This crate is dual-licensed under MIT or the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.