1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Module defining bit numbering orders used by bitfields.
//!
//! This module provides the marker types [`LSB0`] and [`MSB0`], as well as
//! the trait [`BitOrder`]. These types are used by the
//! [`BitFieldImpl::BitOrder`](crate::BitFieldImpl::BitOrder) associated
//! type to indicate the bit ordering chosen for a bitfield.
//!
//! - [`LSB0`] — Least Significant Bit first (default).
//! - [`MSB0`] — Most Significant Bit first.
use Sealed;
/// Least Significant Bit first bit ordering.
///
/// Used as a type-level marker by [`BitFieldImpl::BitOrder`](crate::BitFieldImpl::BitOrder) when
/// a bitfield has `#[bitfield(bitorder(lsb0))]` (the default).
/// Most Significant Bit first bit ordering.
///
/// Used as a type-level marker by [`BitFieldImpl::BitOrder`](crate::BitFieldImpl::BitOrder) when
/// a bitfield has `#[bitfield(bitorder(msb0))]`.
/// Trait representing a bit numbering order for a bitfield.
///
/// Implemented by the marker types [`LSB0`] and [`MSB0`].
/// This trait is used by the [`BitFieldImpl::BitOrder`](crate::BitFieldImpl::BitOrder) associated type
/// to indicate the chosen bit ordering of a bitfield.
///
/// It is sealed to prevent external implementations.