fn parse_packet_from_reader<T: Read>(
reader: BufReader<T>,
path: &Path,
) -> Result<Packet, Error>
Expand description
Recognizes a single OpenPGP packet in a reader.
§Note
The path
parameter is meant to reflect the file path from which the reader is created.
It is only used for better error reporting.
§Errors
Returns an error if
- an OpenPGP packet cannot be parsed from
reader
, - there is no OpenPGP packet in
reader
, - there is at least one additional OpenPGP packet in
reader
, - or there is unparsable data after an initial
OpenPGP
packet.