fn read_packet_from_file(path: impl AsRef<Path>) -> Result<Packet, Error>
Expand description
Reads a single OpenPGP packet from a file.
The file contents may be binary or ASCII-armored.
ยงErrors
Returns an error if
- the file at
path
cannot be opened for reading, - the first byte of the file at
path
cannot be read, - the file at
path
is empty, - or if not exactly one OpenPGP packet is found in the file at
path
.