Expand description
Small formatting/parsing helpers shared by the other modules.
Constants§
Functions§
- dim
- Dimmed — labels, legends, secondary detail.
- error_
block - One failure rendered in the tool’s visual language: a red
✕line, the message’s own continuation lines indented beneath it, then anyanyhowcauses as dim rows. Plain glyphs when colors are off. - fail
- Red — failures.
- force_
remove_ dir - Remove a tree robustly: read-only files (a wrapper’s store, copies that
inherited the read-only attribute) block
remove_dir_allon Windows, so clear the flag and retry once; report the original error if it still fails. - green
- Brand-green text (
#92D293) — section titles and success accents. - heading
- Bold brand green — top-level headings.
- human_
age - Age of a timestamp, human-readable (“3.4 days”).
- human_
bytes 1234567->"1.2 MiB"style, compact.- human_
duration - Compact duration for humans (“3.4 s”, “1.2 min”, “2.1 h”).
- info
- Calm blue — neutral info.
- on_path
- Is
programreachable throughPATH? (barewhich, no extra crate) - parse_
duration - Parse
"30d","2w","12h","90m","45s"or plain seconds"45". - warn
- Amber — warnings.
- which
- Is
programinstalled at all (PATH or cargo bin dir)? - which_
path - Absolute path of
programif discoverable — first onPATH, then as a fallback in Cargo’s own bin dir ($CARGO_HOME/bin, e.g.C:\Users\<user>\.cargo\bin), which rustup tools live in but isn’t on PATH in every shell. ReturnsNonewhen not found anywhere.