u8bits 0.1.0

This crate provides a macro to generate accessors for parts of newtype byte arrays.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented1 out of 5 items with examples
  • Size
  • Source code size: 12.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 698.24 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • freylax/u8bits
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • freylax

u8bits

rust macro to generate setters and getters for bits / bit ranges of u8 arrays

Build Status

This macro invocation:

struct Bytes( [u8;2]);
impl Bytes {
	u8bits! {
		/// foo is bit 4 of byte 0
		foo: rw 0,4;
		/// bar are bits 0..3 of byte 1
		u8, bar: rw 1,0,3;
	}
}

will generate get_ and set_ for foo and bar.