Expand description
Shared utility functions
Functions§
- atomic_
write - Atomically write content to a file using temp + rename.
- atomic_
write_ str - Atomically write string content to a file.
- cbor_
to_ vec - Serialize a value to CBOR bytes.
- configure_
walker - Configure a WalkBuilder for void’s ignore semantics.
- count_
lines - Count the number of lines in a byte slice (SIMD-accelerated via memchr).
- open_
store - Open the object store under
void_dir/objects. - safe_
join - Safely join a relative path to a root directory, preventing path traversal.
- sha256
- Compute SHA-256 hash of data.
- to_utf8
- Convert a
Pathto aUtf8PathBuf, returningVoidError::InvalidPathon non-UTF-8. - validate_
nix_ store_ path - Validate that a path is a legitimate Nix store path.