#bit #level #pattern #match

archived bitpat

Bit-level matching against values

2 releases

Uses old Rust 2015

0.1.1 Aug 1, 2018
0.1.0 Aug 1, 2018

#6 in #level

Download history 14/week @ 2023-10-29 15/week @ 2023-11-05 96/week @ 2023-11-12 34/week @ 2023-11-19 22/week @ 2023-11-26 10/week @ 2023-12-03 18/week @ 2023-12-10 21/week @ 2023-12-17 20/week @ 2023-12-24 17/week @ 2023-12-31 22/week @ 2024-01-07 31/week @ 2024-01-14 38/week @ 2024-01-21 18/week @ 2024-01-28 20/week @ 2024-02-04 37/week @ 2024-02-11

114 downloads per month
Used in 2 crates

CC0 license

10KB
76 lines

bitpat - Bit-level pattern matching

crates.io docs.rs Build Status

This crate provides the bitpat! macro, which can match a value against a bit pattern. This is useful, for example, for low-level code that inspects individual bits in data such as registers or machine instructions.

Please refer to the changelog to see what changed in the last releases.

Usage

Start by adding an entry to your Cargo.toml:

[dependencies]
bitpat = "0.1.1"

Then import the crate into your Rust code:

#[macro_use] extern crate bitpat;

lib.rs:

Allows bit-level matching against values.

Please refer to the bitpat! macro for details.

No runtime deps