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
//!
//! # no-std
//! This crate is no-std and no-alloc.
//!
//! # unsafe
//! Several traits in this crate are unsafe, like [`Adapter`]. If they are
//! implemented incorrectly, you will cause memory unsafety.
extern crate std;
/// A field that can be lensed.
/// Defines the position at which a [`Field`] can be accessed in `self`.
///
/// # Safety
/// 1. `(self.as_ptr()).byte_add(Self::OFFSET).cast::<F::Type>()` must point to
/// a valid instance of `F::Type` inside `self`.
pub unsafe