Module zet::operands

source ·
Expand description

Provides the first_and_rest function, which returns a Vec<u8> containing the contents of the first operand and an ExactSizeIterator over the remaining operands. Note: this different treatment of the first and remaining operands has the unfortunate result of requiring different code paths for translating UTF16 files into UTF8. That currently seems worth the cost.

Structs

  • NextOperand is the Item type for the Remaining iterator. For a given file path, the reader field is a reader for the file with that path, and path_display is the path formatted for use in error messages.
  • The first operand is read into memory in its entirety, but that’s not efficient for the second and subsequent operands. The Remaining structure is an ExactSizeIterator over those operands.

Functions

  • Return the contents of the first file named in files as a Vec<u8>, and an ExactSizeIterator over the subsequent arguments.