Generate rules.mk for bit_field crate am: 86f432e8d8

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/bit_field/+/3018284

Change-Id: I7259162a6449f8cbe3a1888161c0603e82f5891e
Signed-off-by: Automerger Merge Worker <[email protected]>
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.