Expand description
The Device trait: the only abstraction every other crate is allowed to use
when it needs to write to “a thing.” The macOS raw-block-device impl lives
in bootsmith-disk; in tests we substitute an in-memory Vec<u8> impl so
cargo test works without root, without a USB stick, and without macOS.
Structs§
- Memory
Device - In-memory
Deviceimpl used by unit tests. Backed by aVec<u8>.
Traits§
Functions§
- read_
vec - Read
lenbytes atoffsetinto a freshly-allocatedVec<u8>. Convenience wrapper aroundDevice::read_at. - write_
and_ verify - Write
bufatoffset, then re-read and verify byte-equal. ReturnsError::VerifyMismatchon the first divergence.