From a140329b358855983eb5dce3e46dde1005ce492d Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 8 Jun 2020 12:14:34 +0200 Subject: openpgp: Improve documentation. --- openpgp/src/parse.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'openpgp') 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 /// -- cgit v1.2.3