Add missing documentation
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user