Skip to content
  • Neal H. Walfield's avatar
    openpgp: Create a special Option-like type for PacketParser. · c9ee0ac8
    Neal H. Walfield authored
      - In the future, we want to return some summary information about a
        parsed packet sequence after the packet sequence is fully parsed.
        Currently, PacketParser::next() and PacketParser::recurse()
        consume the PacketParser and return None on EOF.  Thus, even if
        the summary information were stored in the PacketParser, it
        becomes inaccessible on EOF.
    
      - This change introduces a new type, PacketParserResult, that
        contains either a PacketParser or a PacketParserEOF.
        PacketParserEOF is returned on EOF instead of None.  Since it is a
        struct, it can hold only any information that we want to return to
        the caller.
    c9ee0ac8