diff options
Diffstat (limited to 'openpgp/src/tpk/mod.rs')
-rw-r--r-- | openpgp/src/tpk/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openpgp/src/tpk/mod.rs b/openpgp/src/tpk/mod.rs index fb1ae43e..29f59da2 100644 --- a/openpgp/src/tpk/mod.rs +++ b/openpgp/src/tpk/mod.rs @@ -368,6 +368,14 @@ impl<'a> Parse<'a, TPKParser<'a, vec::IntoIter<Packet>>> } } +impl std::str::FromStr for TPK { + type Err = failure::Error; + + fn from_str(s: &str) -> std::result::Result<Self, Self::Err> { + Self::from_bytes(s.as_bytes()) + } +} + impl<'a, I: Iterator<Item=Packet>> TPKParser<'a, I> { /// Initializes a TPKParser from an iterator over Packets. pub fn from_iter(iter: I) -> Self { |