From 7b1328b9b7daf1eb3cf3b3f532cff1d9f408de5f Mon Sep 17 00:00:00 2001 From: daxpedda Date: Tue, 20 Jul 2021 14:22:41 +0200 Subject: [PATCH] Add missing documentation --- src/errors.rs | 3 +++ src/keypair.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/errors.rs b/src/errors.rs index 2ee0e72..1590b76 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -101,6 +101,7 @@ impl Debug for InternalPakeError { impl Error for InternalPakeError {} impl InternalPakeError { + /// Convert `InternalPakeError` into `InternalPakeError pub fn into_custom(self) -> InternalPakeError { match self { Self::Custom(_) => unreachable!(), @@ -187,6 +188,7 @@ impl From> for PakeError { } impl PakeError { + /// Convert `PakeError` into `PakeError pub fn into_custom(self) -> PakeError { match self { Self::CryptoError(internal_pake_error) => { @@ -273,6 +275,7 @@ impl From<::std::convert::Infallible> for ProtocolError { } impl ProtocolError { + /// Convert `ProtocolError` into `ProtocolError pub fn into_custom(self) -> ProtocolError { match self { Self::VerificationError(pake_error) => { diff --git a/src/keypair.rs b/src/keypair.rs index 4f81fe6..c60ea80 100644 --- a/src/keypair.rs +++ b/src/keypair.rs @@ -280,6 +280,7 @@ impl SizedBytes for PrivateKey { /// A trait specifying the requirements for a private key container pub trait SecretKey: Clone + Sized + Zeroize { + /// Custom error type that can be passed down to `InternalPakeError::Custom` type Error; /// Diffie-Hellman key exchange implementation