4 releases

0.1.3 Aug 24, 2023
0.1.2 Aug 24, 2023
0.1.1 Aug 9, 2023
0.1.0 Aug 9, 2023

#1149 in Encoding

35 downloads per month

MIT/Apache

7KB
125 lines

ResolvedPathBuf

This type is a wrapper around a normal PathBuf that is resolved upon construction. This happens through the resolve_path crate.

Additionally, this wrapper preserves the original path as well, and uses the original when serialized using serde. This makes this wrapper a safe tool when dealing with user provided path. For example either through command line arguments or configuration values.

Preserving the original allows us to avoid modifying the user configuration when serializing the configuration back to the disk.

Dependencies

~0.5–1.4MB
~26K SLoC