Crate treefmt

Source
Expand description

Your favorite all-in-one formatter tool!

Modules§

command
CLI command structures for formatter
config
Contains the project configuration schema and parsing
engine
The main formatting engine logic is in this module.
eval_cache
Keep track of evaluations
formatter
Utilities for the formatters themselves.

Structs§

FileMeta
FileMeta represents file meta that change on file modification It currently stores a file mtime and size tuple.

Functions§

expand_if_path
Only expands the path if the string contains a slash (/) in it. Otherwise consider it as a string.
expand_path
Returns an absolute path. If the path is absolute already, leave it alone. Otherwise join it to the reference path. Then clean all superfluous ../
get_meta
Small utility that stat() and retrieve the mtime of a file metadata
get_path_meta
Small utility that stat() and retrieve the mtime of a file path