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
pathcannot be opened for reading, - the first byte of the file at
pathcannot be read, - the file at
pathis empty, - or if not exactly one OpenPGP packet is found in the file at
path.