Module util

Module util 

Source
Expand description

Utility functions and types used throughout the composefs crate.

This module provides common functionality including error handling helpers, I/O utilities for reading data streams, SHA256 digest parsing, and filesystem operations like atomic symlink replacement.

TraitsΒ§

ErrnoFilter πŸ”’

FunctionsΒ§

generate_tmpname πŸ”’
parse_sha256
Parse a string containing a SHA256 digest in hexidecimal form into a Sha256Digest.
proc_self_fd πŸ”’
Formats a string like β€œ/proc/self/fd/3” for the given fd. This can be used to work with kernel APIs that don’t directly accept file descriptors.
read_exactish
This function reads the exact amount of bytes required to fill the buffer, possibly performing multiple reads to do so (and also retrying if required to deal with EINTR).
read_exactish_async
This function reads the exact amount of bytes required to fill the buffer, possibly performing multiple reads to do so (and also retrying if required to deal with EINTR).
replace_symlinkat πŸ”’

Type AliasesΒ§

Sha256Digest
A utility type representing a SHA-256 digest in binary.