diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-10-14 11:38:33 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-10-14 12:01:22 +0200 |
commit | 2079449be080b4da3cdc8c6f9972f4ac48e58aaf (patch) | |
tree | c3b4567348ff7e2f9dd4ffb514996351e1fb9498 /openpgp/src | |
parent | 57531dbe5b277a46982e4dd2b0ab6c20ebe43682 (diff) |
Use 'Examples' for the examples section.
- See #480.
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/cert/bindings.rs | 10 | ||||
-rw-r--r-- | openpgp/src/cert/parser/mod.rs | 2 | ||||
-rw-r--r-- | openpgp/src/fmt.rs | 2 | ||||
-rw-r--r-- | openpgp/src/packet_pile.rs | 8 | ||||
-rw-r--r-- | openpgp/src/serialize/cert.rs | 6 | ||||
-rw-r--r-- | openpgp/src/serialize/cert_armored.rs | 2 | ||||
-rw-r--r-- | openpgp/src/serialize/stream.rs | 62 | ||||
-rw-r--r-- | openpgp/src/serialize/stream/padding.rs | 4 |
8 files changed, 48 insertions, 48 deletions
diff --git a/openpgp/src/cert/bindings.rs b/openpgp/src/cert/bindings.rs index 56ca443e..5da9360d 100644 --- a/openpgp/src/cert/bindings.rs +++ b/openpgp/src/cert/bindings.rs @@ -29,7 +29,7 @@ impl<P: key::KeyParts> Key<P, key::SubordinateRole> { /// fingerprint subpacket, and a issuer subpacket to the /// signature. /// - /// # Example + /// # Examples /// /// This example demonstrates how to bind this key to a Cert. Note /// that in general, the `CertBuilder` is a better way to add @@ -91,7 +91,7 @@ impl UserID { /// fingerprint subpacket, and a issuer subpacket to the /// signature. /// - /// # Example + /// # Examples /// /// This example demonstrates how to bind this userid to a Cert. /// Note that in general, the `CertBuilder` is a better way to add @@ -146,7 +146,7 @@ impl UserID { /// one of `SignatureType::{Generic, Persona, Casual, /// Positive}Certificate` /// - /// # Example + /// # Examples /// /// This example demonstrates how to certify a userid. /// @@ -222,7 +222,7 @@ impl UserAttribute { /// fingerprint subpacket, and a issuer subpacket to the /// signature. /// - /// # Example + /// # Examples /// /// This example demonstrates how to bind this user attribute to a /// Cert. Note that in general, the `CertBuilder` is a better way @@ -282,7 +282,7 @@ impl UserAttribute { /// one of `SignatureType::{Generic, Persona, Casual, /// Positive}Certificate` /// - /// # Example + /// # Examples /// /// This example demonstrates how to certify a userid. /// diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs index 8bd91317..7530345c 100644 --- a/openpgp/src/cert/parser/mod.rs +++ b/openpgp/src/cert/parser/mod.rs @@ -424,7 +424,7 @@ impl CertValidator { /// [`Cert`]: ../struct.Cert.html /// [`Unknown`]: ../enum.Packet.html#variant.Unknown /// -/// # Example +/// # Examples /// /// Print information about all certificates in a keyring: /// diff --git a/openpgp/src/fmt.rs b/openpgp/src/fmt.rs index 586aa922..f7bb8e31 100644 --- a/openpgp/src/fmt.rs +++ b/openpgp/src/fmt.rs @@ -37,7 +37,7 @@ pub mod hex { /// Writes annotated hex dumps, like hd(1). /// - /// # Example + /// # Examples /// /// ```rust /// use sequoia_openpgp::fmt::hex; diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs index a7d3c03c..a623132f 100644 --- a/openpgp/src/packet_pile.rs +++ b/openpgp/src/packet_pile.rs @@ -27,7 +27,7 @@ use crate::parse::Cookie; /// Normally, you'll want to convert the `PacketPile` to a Cert or a /// `Message`. /// -/// # Example +/// # Examples /// /// This example shows how to modify packets in PacketPile using [`pathspec`]s. /// @@ -229,7 +229,7 @@ impl PacketPile { /// Note: there is no packet at the root. Thus, the path `[]` /// returns None. /// - /// # Example + /// # Examples /// /// ```rust /// # use sequoia_openpgp as openpgp; @@ -284,7 +284,7 @@ impl PacketPile { /// /// See the description of the `path_spec` for more details. /// - /// # Example + /// # Examples /// /// ```rust /// # use sequoia_openpgp as openpgp; @@ -345,7 +345,7 @@ impl PacketPile { /// If the path was invalid, then `Error::IndexOutOfRange` is /// returned instead. /// - /// # Example + /// # Examples /// /// ```rust /// # use sequoia_openpgp as openpgp; diff --git a/openpgp/src/serialize/cert.rs b/openpgp/src/serialize/cert.rs index 177f9b8b..10831123 100644 --- a/openpgp/src/serialize/cert.rs +++ b/openpgp/src/serialize/cert.rs @@ -300,7 +300,7 @@ impl Cert { /// [`Cert`]: ../cert/struct.Cert.html /// [`Cert::as_tsk()`]: ../cert/struct.Cert.html#method.as_tsk /// -/// # Example +/// # Examples /// /// ``` /// # use sequoia_openpgp::{*, cert::*, parse::Parse, serialize::Serialize}; @@ -336,7 +336,7 @@ impl<'a> TSK<'a> { /// /// Note that the given filter replaces any existing filter. /// - /// # Example + /// # Examples /// /// This example demonstrates how to create a TSK with a detached /// primary secret key. @@ -393,7 +393,7 @@ impl<'a> TSK<'a> { /// [`S2K`]: ../crypto/enum.S2K.html /// [this test]: https://tests.sequoia-pgp.org/#Detached_primary_key /// - /// # Example + /// # Examples /// /// This example demonstrates how to create a TSK with a detached /// primary secret key, serializing it using secret key stubs. diff --git a/openpgp/src/serialize/cert_armored.rs b/openpgp/src/serialize/cert_armored.rs index a7cf6040..58c53dae 100644 --- a/openpgp/src/serialize/cert_armored.rs +++ b/openpgp/src/serialize/cert_armored.rs @@ -66,7 +66,7 @@ impl Cert { /// the Cert's userids are added as comments, so that it is easier /// to identify the Cert when looking at the armored data. /// - /// # Example + /// # Examples /// /// ```rust /// use sequoia_openpgp as openpgp; diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index 1ad270d7..b5c4cce2 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -209,7 +209,7 @@ pub struct Message<'a>(writer::BoxStack<'a, Cookie>); impl<'a> Message<'a> { /// Starts streaming an OpenPGP message. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -238,7 +238,7 @@ impl<'a> Message<'a> { /// care. If done improperly, the resulting message may be /// malformed. /// - /// # Example + /// # Examples /// /// This demonstrates how to create a compressed, signed message /// from a detached signature. @@ -296,7 +296,7 @@ impl<'a> Message<'a> { /// Failing to finalize the message may result in corrupted /// messages. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -537,7 +537,7 @@ pub struct ArbitraryWriter<'a> { impl<'a> ArbitraryWriter<'a> { /// Creates a new writer with the given tag. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -661,7 +661,7 @@ impl<'a> Signer<'a> { /// [`Signer::detached`]: #method.detached /// [`Signer::with_template`]: #method.with_template /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -750,7 +750,7 @@ impl<'a> Signer<'a> { /// [`Signer::hash_algo`]: #method.hash_algo /// [`Signer::add_intended_recipient`]: #method.add_intended_recipient /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -820,7 +820,7 @@ impl<'a> Signer<'a> { /// [Section 11.4 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-11.4 /// [`LiteralWriter`]: ../struct.LiteralWriter.html /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -891,7 +891,7 @@ impl<'a> Signer<'a> { /// /// Can be used multiple times. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -943,7 +943,7 @@ impl<'a> Signer<'a> { /// /// [*Surreptitious Forwarding*]: http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -985,7 +985,7 @@ impl<'a> Signer<'a> { /// Sets the hash algorithm to use for the signatures. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1027,7 +1027,7 @@ impl<'a> Signer<'a> { /// Note: it is up to the caller to make sure the signing keys are /// actually valid as of `time`. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1083,7 +1083,7 @@ impl<'a> Signer<'a> { /// [Section 11.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-11.3 /// [Section 11.4 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-11.4 /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1280,7 +1280,7 @@ pub struct LiteralWriter<'a> { impl<'a> LiteralWriter<'a> { /// Creates a new literal writer. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1311,7 +1311,7 @@ impl<'a> LiteralWriter<'a> { /// Sets the data format. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1344,7 +1344,7 @@ impl<'a> LiteralWriter<'a> { /// not be longer than 255 bytes. Returns an error if the given /// name is longer than that. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1376,7 +1376,7 @@ impl<'a> LiteralWriter<'a> { /// Returns an error if the given date is not representable by /// OpenPGP. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1408,7 +1408,7 @@ impl<'a> LiteralWriter<'a> { /// /// The next step is to write the payload to the writer stack. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1559,7 +1559,7 @@ impl<'a> Compressor<'a> { /// [`Compressor::algo`]: #method.algo /// [`Compressor::level`]: #method.level /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1589,7 +1589,7 @@ impl<'a> Compressor<'a> { /// Sets the compression algorithm. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1619,7 +1619,7 @@ impl<'a> Compressor<'a> { /// Sets the compression level. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1653,7 +1653,7 @@ impl<'a> Compressor<'a> { /// [`Signer`]: struct.Signer.html /// [`LiteralWriter`]: struct.LiteralWriter.html /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1831,7 +1831,7 @@ impl<'a> Recipient<'a> { /// [`ValidKeyAmalgamation`]: ../../cert/amalgamation/key/struct.ValidKeyAmalgamation.html /// [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1891,7 +1891,7 @@ impl<'a> Recipient<'a> { /// Gets the recipient keyid. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -1942,7 +1942,7 @@ impl<'a> Recipient<'a> { /// Sets the recipient keyid. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2034,7 +2034,7 @@ impl<'a> Encryptor<'a> { /// [`Encryptor::sym_algo`]: #method.sym_algo /// [`Encryptor::aead_algo`]: #method.aead_algo /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2110,7 +2110,7 @@ impl<'a> Encryptor<'a> { /// [`Encryptor::sym_algo`]: #method.sym_algo /// [`Encryptor::aead_algo`]: #method.aead_algo /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2149,7 +2149,7 @@ impl<'a> Encryptor<'a> { /// The resulting message can be encrypted by any recipient and /// with any password. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2232,7 +2232,7 @@ impl<'a> Encryptor<'a> { /// The resulting message can be encrypted with any password and /// by any recipient. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2312,7 +2312,7 @@ impl<'a> Encryptor<'a> { /// Sets the symmetric algorithm to use. /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2343,7 +2343,7 @@ impl<'a> Encryptor<'a> { /// /// This feature is [experimental](../../index.html#experimental-features). /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { @@ -2391,7 +2391,7 @@ impl<'a> Encryptor<'a> { /// [`Signer`]: struct.Signer.html /// [`LiteralWriter`]: struct.LiteralWriter.html /// - /// # Example + /// # Examples /// /// ``` /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { diff --git a/openpgp/src/serialize/stream/padding.rs b/openpgp/src/serialize/stream/padding.rs index b92f913c..b1750b07 100644 --- a/openpgp/src/serialize/stream/padding.rs +++ b/openpgp/src/serialize/stream/padding.rs @@ -99,7 +99,7 @@ use crate::types::{ /// /// [Section 9.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-9.3 /// -/// # Example +/// # Examples /// /// This example illustrates the use of `Padder` with the [Padmé] /// policy. Note that for brevity, the encryption and signature @@ -148,7 +148,7 @@ pub struct Padder<'a, P: Fn(u64) -> u64 + 'a> { impl<'a, P: Fn(u64) -> u64 + 'a> Padder<'a, P> { /// Creates a new padder with the given policy. /// - /// # Example + /// # Examples /// /// This example illustrates the use of `Padder` with the [Padmé] /// policy. |