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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use crateBitFieldImpl;
/// Describes a type that can be stored in a [`BitField`](crate::BitField) via a [`Field`](crate::Field).
///
/// Provides the size of the type in bits and the corresponding storage type (BitsType)
/// used to convert the value to and from raw bits.
/// Describe a single **field** within a [`BitField`](crate::BitField).
///
/// Each field of a [`BitField`](crate::BitField) struct implements `Field` automatically
/// via the `bitfield` macro. This trait is **not meant to be implemented manually**.
///
/// The type parameter `T` is the bitfield struct that this field belongs to,
/// this help ensuring that fields cannot be used on the wrong struct.
///
/// # Usage
///
/// End-users generally do not interact with `Field` directly.
/// Instead, use the convenience methods on the parent [`BitField`](crate::BitField) struct,
/// such as [`get`](crate::BitField::get) and [`set`](crate::BitField::set).
impl_field_type!;
impl_field_type!;
impl_field_type!;
impl_field_type!;
impl_field_type!;