Expand description
Binary-owned presentation extensions for SubXError.
The SubXError taxonomy itself lives in subx_core::error and ships with
the library half of the split (subx-core): category(), machine_code()
and hint() are inherent methods there because machine-readable front
ends (e.g. the Tauri GUI) consume them directly.
Process exit codes and multi-line terminal prose with Hint: lines,
however, are properties of running the subx-cli binary — a library
consumer embeds SubXError in its own presentation layer and has neither
a process exit code nor a terminal. Those two operations therefore live
here, as an extension trait owned by the binary:
SubXErrorExt::exit_code— the stable 1–6 process exit mapping.SubXErrorExt::user_friendly_message— the multi-line, hinted, terminal-facing message.
Code under src/core/ and src/services/ SHALL NOT import this trait or
call either method; core code that needs a rendered message uses
Display (to_string()), optionally combined with hint().
Traits§
- SubX
Error Ext - Presentation-layer extensions to
SubXErrorowned by the binary.