diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2022-06-09 09:43:53 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2022-06-09 10:39:07 +0200 |
commit | f4417de86b2824424d7a625d713117d8587e1869 (patch) | |
tree | 525553a0fdeb7732115745f03e7112bb40ca3b13 /openpgp/src/armor.rs | |
parent | 830c2fc62c3ac0767a36ede7330f93b9539b9b67 (diff) |
openpgp: Fix armor::Reader::from_reader documentation.
- The documentation got out of sync with ReaderMode.
- Describe various available modes in terms of ReaderMode.
- Fixes #847.
Diffstat (limited to 'openpgp/src/armor.rs')
-rw-r--r-- | openpgp/src/armor.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index 47f86b9a..7d241398 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -627,14 +627,18 @@ impl<'a> Reader<'a> { /// damaged. For example, copying data manually from one program /// to another might introduce or drop newlines. /// - /// By default, the reader operates in robust mode. It will - /// extract the first armored OpenPGP data block it can find, even - /// if the armor frame is damaged, or missing. + /// By default, the reader operates in tolerant mode. It will + /// ignore common formatting errors but the header and footer + /// lines must be intact. /// - /// To select strict mode, specify a kind argument. In strict - /// mode, the reader will match on the armor frame. The reader - /// ignores any data in front of the Armor Header Line, as long as - /// the line the header is only prefixed by whitespace. + /// To select stricter mode, specify the kind argument for + /// tolerant mode. In this mode only ASCII Armor blocks with the + /// appropriate header are recognized. + /// + /// There is also very tolerant mode that is appropriate when + /// reading text that the user cut and pasted into a text area. + /// This mode of operation is CPU intense, particularly on large + /// text files. /// /// [ASCII Armor]: https://tools.ietf.org/html/rfc4880#section-6.2 /// |