> Some API like atomics and I/O operate on primitives only; therefore other > types would need to converted to these primitive first. Add two traits > `AsRepr` and `AsReprMut` to indicate that the type can be turned into a > primitive for these operations. > > `T: AsRepr` means that `&T` can be viewed as `&T::Repr` and thus it needs > to support transmutability in one direction. `T: AsReprMut` means that > `&mut T` can be viewed as `&mut T::Repr` and thus it needs to support > bi-directional transmutability. > > To avoid duplicating implementations, all repr types are normalized to > unsigned integers. > > Signed-off-by: Gary Guo <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3
