Crates.io | set_bits |
lib.rs | set_bits |
version | 1.2.0 |
source | src |
created_at | 2020-04-17 08:47:25.313975 |
updated_at | 2024-03-03 04:17:09.710788 |
description | Set and clear bits from specified address. |
homepage | |
repository | https://github.com/toku-sa-n/set_bits |
max_upload_size | |
id | 231075 |
size | 15,585 |
NOTE: This library is no longer maintained. Consider using the following crates:
set_bits is a Rust library for setting and clearing bits on memory.
Add set_bits
to your Cargo.toml
file.
use set_bits;
// Set 20 bits from the 10th bit of address 0xCAFEBABE
set_bits::set(0xCAFEBABE, 10, 20);
// Clear 20 bits from the 10th bit of address 0xCAFEBABE
set_bits::clear(0xCAFEBABE, 10, 20);
Apache-2.0 or MIT