diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-04-02 14:48:03 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-04-02 16:42:54 +0200 |
commit | 789ae8615fda8e6dcbc1a39625e322255da90cef (patch) | |
tree | 97b8fec96ef1bfcd1d7c09a264d138803a6b85c0 /openpgp-ffi/src/packet/userid.rs | |
parent | 6dd60b0b306e5d69b8770a5fa1f0bbfcead2270c (diff) |
openpgp-ffi: Use UserIDAmalgamations, not UserIDBundles.
- Add the `UserID`, `UserIDAmalgamation` and
`ValidUserIDAmalgamation` types, and some associated methods.
- Replace the use of `UserIDBundle` with `UserIDAmalgamation` and
`ValidUserIDAmalgamation`.
Diffstat (limited to 'openpgp-ffi/src/packet/userid.rs')
-rw-r--r-- | openpgp-ffi/src/packet/userid.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/openpgp-ffi/src/packet/userid.rs b/openpgp-ffi/src/packet/userid.rs index 69e49b42..339f1486 100644 --- a/openpgp-ffi/src/packet/userid.rs +++ b/openpgp-ffi/src/packet/userid.rs @@ -12,6 +12,19 @@ use super::Packet; use crate::RefRaw; use crate::MoveIntoRaw; +/// Holds a UserID packet. +/// +/// See [Section 5.11 of RFC 4880] for details. +/// +/// [Section 5.11 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.11 +/// +/// Wraps [`sequoia-openpgp::packet::UserID`]. +/// +/// [`sequoia-openpgp::packet::UserID`]: ../../../sequoia_openpgp/packet/struct.UserID.html +#[crate::ffi_wrapper_type(prefix = "pgp_", + derive = "Clone, Debug, PartialEq")] +pub struct UserID(openpgp::packet::UserID); + /// Create a new User ID with the value `value`. /// /// `value` need not be valid UTF-8, but it must be NUL terminated. |