diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-04 18:17:40 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-04 18:17:40 +0100 |
commit | 00ddb6dfcb65d45167c0537590e255f1be7a02e7 (patch) | |
tree | 8b6683a3c613a76e4f101b3787699e9b70f49e37 /openpgp | |
parent | 37ac7c2d2fe54047c458eaee31aa21e6bf2b45c9 (diff) |
openpgp: Make types in openpgp::cert private if possible.
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/src/cert/mod.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs index ef839428..23db1bc8 100644 --- a/openpgp/src/cert/mod.rs +++ b/openpgp/src/cert/mod.rs @@ -103,14 +103,15 @@ impl<K: key::KeyParts, R: key::KeyRole> KeyBinding<K, R> } /// A primary key and any associated signatures. -pub type PrimaryKeyBinding<KeyPart> = KeyBinding<KeyPart, key::PrimaryRole>; +type PrimaryKeyBinding<KeyPart> = KeyBinding<KeyPart, key::PrimaryRole>; /// A subkey and any associated signatures. pub type SubkeyBinding<KeyPart> = KeyBinding<KeyPart, key::SubordinateRole>; /// A key (primary or subkey, public or private) and any associated /// signatures. -pub type GenericKeyBinding +#[allow(dead_code)] +type GenericKeyBinding = ComponentBinding<Key<key::UnspecifiedParts, key::UnspecifiedRole>>; /// A User ID and any associated signatures. @@ -541,7 +542,7 @@ impl<'a, C> ExactSizeIterator for ComponentBindingIter<'a, C> /// /// Note: we need this, because we can't `impl Vec<ComponentBindings>`. #[derive(Debug, Clone, PartialEq)] -pub struct ComponentBindings<C> +struct ComponentBindings<C> where ComponentBinding<C>: cmp::PartialEq { bindings: Vec<ComponentBinding<C>>, @@ -637,26 +638,27 @@ impl<C> ComponentBindings<C> /// A vecor of key (primary or subkey, public or private) and any /// associated signatures. -pub type KeyBindings<KeyPart, KeyRole> = ComponentBindings<Key<KeyPart, KeyRole>>; +type KeyBindings<KeyPart, KeyRole> = ComponentBindings<Key<KeyPart, KeyRole>>; /// A vector of subkeys and any associated signatures. -pub type SubkeyBindings<KeyPart> = KeyBindings<KeyPart, key::SubordinateRole>; +type SubkeyBindings<KeyPart> = KeyBindings<KeyPart, key::SubordinateRole>; /// A vector of key (primary or subkey, public or private) and any /// associated signatures. -pub type GenericKeyBindings +#[allow(dead_code)] +type GenericKeyBindings = ComponentBindings<Key<key::UnspecifiedParts, key::UnspecifiedRole>>; /// A vector of User ID bindings and any associated signatures. -pub type UserIDBindings = ComponentBindings<UserID>; +type UserIDBindings = ComponentBindings<UserID>; /// A vector of User Attribute bindings and any associated signatures. -pub type UserAttributeBindings = ComponentBindings<UserAttribute>; +type UserAttributeBindings = ComponentBindings<UserAttribute>; /// A vector of unknown components and any associated signatures. /// /// Note: all signatures are stored as certifications. -pub type UnknownBindings = ComponentBindings<Unknown>; +type UnknownBindings = ComponentBindings<Unknown>; /// A OpenPGP Certificate. |