summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-13 09:47:36 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-13 16:42:58 +0200
commit149d77f437f2ac2f2dafa4c424a39263b5ffebdc (patch)
tree94429c6a1f5ec1c33cade9b276c75084a90b4034 /openpgp/src/types
parent3192c800ad15b18757dc9596f5946edfe9f2e5d2 (diff)
openpgp: Add note to enums that cannot be exhaustively matched.
Diffstat (limited to 'openpgp/src/types')
-rw-r--r--openpgp/src/types/mod.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs
index dff23cc3..8bc4009e 100644
--- a/openpgp/src/types/mod.rs
+++ b/openpgp/src/types/mod.rs
@@ -74,6 +74,9 @@ pub(crate) use timestamp::normalize_systemtime;
/// The OpenPGP public key algorithms as defined in [Section 9.1 of
/// RFC 4880], and [Section 5 of RFC 6637].
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// ```rust
@@ -296,6 +299,9 @@ impl PublicKeyAlgorithm {
/// curves. Instead, the curve is specified using an OID prepended to
/// the key material. We provide this type to be able to match on the
/// curves.
+///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum Curve {
/// NIST curve P-256.
@@ -530,6 +536,9 @@ impl Arbitrary for Curve {
///
/// [`SymmetricAlgorithm::from`]: https://doc.rust-lang.org/std/convert/trait.From.html
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// Use `SymmetricAlgorithm` to set the preferred symmetric algorithms on a signature:
@@ -686,6 +695,9 @@ impl Arbitrary for SymmetricAlgorithm {
///
/// [`AEADAlgorithm::from`]: https://doc.rust-lang.org/std/convert/trait.From.html
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// This feature is [experimental](../index.html#experimental-features).
///
/// # Examples
@@ -796,6 +808,9 @@ impl Arbitrary for AEADAlgorithm {
///
/// [Section 9.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-9.3
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// Use `CompressionAlgorithm` to set the preferred compressions algorithms on
@@ -938,6 +953,9 @@ impl Arbitrary for CompressionAlgorithm {
/// The OpenPGP hash algorithms as defined in [Section 9.4 of RFC 4880].
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// Use `HashAlgorithm` to set the preferred hash algorithms on a signature:
@@ -1075,6 +1093,9 @@ impl Arbitrary for HashAlgorithm {
///
/// [Section 5.2.1 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.2.1
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// Use `SignatureType` to create a timestamp signature:
@@ -1235,6 +1256,9 @@ impl Arbitrary for SignatureType {
///
/// [Section 5.2.3.23 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.2.3.23
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// ```rust
@@ -1496,6 +1520,9 @@ impl ReasonForRevocation {
///
/// [Section 5.9 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.9
///
+/// Note: This enum cannot be exhaustively matched to allow future
+/// extensions.
+///
/// # Examples
///
/// Construct a new [`Message`] containing one text literal packet: