commit | 5823609304eb14df3db59c160ac974f3b8e86d9a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sun Nov 10 08:08:28 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sun Nov 10 08:08:28 2024 +0000 |
tree | 312c067757ffde10cd022e9f9a22bf7c42e25436 | |
parent | 3bbaad57780642f51fab3195cc5fa54408426bda [diff] | |
parent | f66dc5242ee75ca43a41facd77877ff142c7e297 [diff] |
Snap for 12618673 from f66dc5242ee75ca43a41facd77877ff142c7e297 to busytown-mac-infra-release Change-Id: I5adfd90455a3d23878223131fb344b0cd6d4d96c
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 is available on docs.rs
[dependencies] bit_field = "0.10.1"
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);
This crate is dual-licensed under MIT or the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.