Expand description
Shared presentation: the color decision, the field-tinted styling the capture decoder needs, and the key/value report layout every command prints.
Enums§
- Color
Choice - When decoded output carries ANSI color.
Constants§
- LABEL_
WIDTH 🔒 - Column at which a report’s values line up. Wide enough for the
longest label a report prints (
capabilities:).
Statics§
- COLOR 🔒
- Resolved once at startup so every module can ask without threading a flag through call after call. A tool this shape has exactly one output stream and one answer for it.
Functions§
- address
- A public key in the canonical fixed-width base58 address form — how this tool prints every key, wherever it came from. Anything that is not key-shaped has no address to render and falls back to hex, so a device that quotes something unexpected still shows what it said.
- color
- field
- One line of a key/value report:
label:in the left column, value in the right. - hex
- Lowercase hex, no separators — the form every digest and id in this
tool’s output uses. Public keys go through
addressinstead. - note
- A note about what the tool just did, or declined to do. Stays on
stdout with the rest of the report; failures go through
Err. - set_
color - styled
- Wrap
textin the given SGR parameters, or return it unchanged when the output is not colorized. - subfield
- A nested line of a key/value report, indented under its parent.
- warn
- Something the user is likely to have gotten wrong, which did not stop the command from succeeding.