Add missing documentation

This commit is contained in:
daxpedda
2021-07-23 15:23:10 -07:00
committed by Kevin Lewi
parent dedc814416
commit 7b1328b9b7
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -101,6 +101,7 @@ impl<T: Debug> Debug for InternalPakeError<T> {
impl<T: Error> Error for InternalPakeError<T> {}
impl InternalPakeError {
/// Convert `InternalPakeError<Infallible>` into `InternalPakeError<T>
pub fn into_custom<T>(self) -> InternalPakeError<T> {
match self {
Self::Custom(_) => unreachable!(),
@@ -187,6 +188,7 @@ impl<T> From<InternalPakeError<T>> for PakeError<T> {
}
impl PakeError {
/// Convert `PakeError<Infallible>` into `PakeError<T>
pub fn into_custom<T>(self) -> PakeError<T> {
match self {
Self::CryptoError(internal_pake_error) => {
@@ -273,6 +275,7 @@ impl<T> From<::std::convert::Infallible> for ProtocolError<T> {
}
impl ProtocolError {
/// Convert `ProtocolError<Infallible>` into `ProtocolError<T>
pub fn into_custom<T>(self) -> ProtocolError<T> {
match self {
Self::VerificationError(pake_error) => {
+1
View File
@@ -280,6 +280,7 @@ impl<G: Group> SizedBytes for PrivateKey<G> {
/// A trait specifying the requirements for a private key container
pub trait SecretKey<G: Group>: Clone + Sized + Zeroize {
/// Custom error type that can be passed down to `InternalPakeError::Custom`
type Error;
/// Diffie-Hellman key exchange implementation