Skip to main content

Module payload

Module payload 

Source
Expand description

The file: / text: value schemes shared by every payload-typed option.

Payload-typed options (patterns, replacements, structured values, stdin text, prose) accept a scheme prefix that says where the value comes from:

  • file:PATH — the value is the file’s contents, read verbatim (exact bytes, UTF-8). A file:-sourced pattern is never promoted: its match mode defaults to literal.
  • text:VALUE — the remainder is the literal value; the escape hatch for a payload that genuinely begins with file: or text:.

Only these two exact prefixes are recognised. Everything else is literal as-is — there is no general scheme: reservation, so values like http://… and std::fmt are unaffected.

Structs§

Resolved
A payload value with its origin, after scheme resolution.

Functions§

resolve
Resolve a raw option value through the file: / text: schemes.
to_lines
Split a payload into its lines for line-anchored matching. A single final terminating newline ends the last line — it does not add an empty trailing line. An empty payload has zero lines.