Expand description
Filesystem-format options bag.
Every backend’s FormatOpts struct has its own shape — ext cares
about block size and journal length, fat32 about volume id and
cluster shift, squashfs about compression. The CLI and the TOML
spec layer both need a way to ferry those settings through a single
type-erased channel:
- CLI:
fstool create --type ext4 -O block_size=4096,sparse=true ./src out.img - TOML:
[filesystem.options]table with the same key names
OptionMap is that channel. The caller (a parse_format_opts
function on each FS) consumes recognised keys with take_u32 /
take_bool / take_str etc., then calls
OptionMap::check_empty to surface a clear error if the user
passed a key the backend doesn’t recognise.
Structs§
- Option
Map - A type-erased bag of
key=valuestrings consumed by a backend’s format-options parser. Built from CLI-Oflags, a TOML[filesystem.options]table, or both at once.