diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-06-08 12:14:34 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-06-08 12:14:34 +0200 |
commit | a140329b358855983eb5dce3e46dde1005ce492d (patch) | |
tree | 6a84948d0b30e1c497a72f2ccb32b56a62f68911 | |
parent | d374247e23548ab7afba1b3f944d2152457d48b5 (diff) |
openpgp: Improve documentation.
-rw-r--r-- | openpgp/src/parse.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index 6121ef31..7f78bb98 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -2885,6 +2885,7 @@ impl PacketParserState { /// attack, the parsers don't recurse more than /// [`DEFAULT_MAX_RECURSION_DEPTH`] times, by default. /// +/// [`PacketParser`]: struct.PacketParser.html /// [`PacketPileParser`]: struct.PacketPileParser.html /// [`DEFAULT_MAX_RECURSION_DEPTH`]: constant.DEFAULT_MAX_RECURSION_DEPTH.html /// @@ -3429,6 +3430,8 @@ impl <'a> PacketParser<'a> { /// [`PacketParser::decrypt`]. Once successfully decrypted, it /// returns `false`. /// + /// [`PacketParser::decrypt`]: struct.PacketParser.html#method.decrypt + /// /// # Examples /// /// ```rust @@ -4723,12 +4726,16 @@ impl<'a> PacketParser<'a> { /// Tries to decrypt the current packet. /// /// On success, this function pushes one or more readers onto the - /// `PacketParser`'s reader stack, and sets the packet's - /// `decrypted` flag. + /// `PacketParser`'s reader stack, and clears the packet parser's + /// `encrypted` flag (see [`PacketParser::encrypted`]). + /// + /// [`PacketParser::encrypted`]: struct.PacketParser.html#method.encrypted /// /// If this function is called on a packet that does not contain /// encrypted data, or some of the data was already read, then it - /// returns `Error::InvalidOperation`. + /// returns [`Error::InvalidOperation`]. + /// + /// [`Error::InvalidOperation`]: ../enum.Error.html#variant.InvalidOperation /// /// # Examples /// |