mycelium_bitfield/
lib.rs

1#![doc = include_str!("../README.md")]
2#![warn(missing_docs, rustdoc::broken_intra_doc_links)]
3#![cfg_attr(not(test), no_std)]
4#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg, doc_cfg_hide))]
5#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))]
6#![cfg_attr(trace_macros, feature(trace_macros))]
7
8pub mod pack;
9pub use self::pack::*;
10mod bitfield;
11mod from_bits;
12pub use self::from_bits::FromBits;
13
14/// An example of the code generated by the [`bitfield!`] macro.
15///
16/// > **Warning**: This module is included for DEMONSTRATION PURPOSES ONLY.
17/// > This module is *not* part of the public API of this crate; it is provided
18/// > as documentation only, and may change in non-breaking releases.
19///
20/// The [`ExampleBitfield`] type in this module was generated by the
21/// following [`bitfield!`] invocation:
22///
23/// ```ignore
24#[doc = include_str!("example/example_bitfield.rs")]
25/// ```
26///
27/// This module also contains two example types implementing the
28/// [`FromBits`] trait, as a demonstration of how typed enums can
29/// be used with the [`bitfield!`] macro.
30///
31///
32/// [`ExampleBitfield`]: example::ExampleBitfield
33#[cfg(any(test, docsrs, trace_macros))]
34#[allow(missing_docs)]
35pub mod example;