commit | 8bf814e56d2c2287b5eee2ae072cf1b2dff011f0 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Fri Nov 01 16:12:48 2024 +0000 |
committer | James Farrell <[email protected]> | Fri Nov 01 16:12:48 2024 +0000 |
tree | dbc8c792e296ee9bebb70b45bde63f48da270469 | |
parent | 04d3c0de766019c5330dc8f99bced4dc321d7cf7 [diff] |
Change LICENSE to symlink. Bug: http://b/339424309 Test: treehugger Change-Id: Ic8ab1abcd0c7387c75fbdd4939067ecf000f8cff
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.