pub enum InternalError<T = Infallible> {
Custom(T),
InvalidByteSequence,
SizeError {
name: &'static str,
len: usize,
actual_len: usize,
},
PointError,
HashToScalar,
HkdfError,
HmacError,
KsfError,
SealOpenHmacError,
IncompatibleEnvelopeModeError,
OprfError(Error),
OprfInternalError(InternalError),
}Expand description
Represents an error in the manipulation of internal cryptographic data
Variants§
Custom(T)
Custom SecretKey error type
InvalidByteSequence
Deserializing from a byte sequence failed
SizeError
Invalid length for {name}: expected {len}, but is actually {actual_len}.
PointError
Could not decompress point.
HashToScalar
Size of input is empty or longer then u16::MAX.
HkdfError
Computing HKDF failed while deriving subkeys
HmacError
Computing HMAC failed while supplying a secret key
KsfError
Computing the key stretching function failed
SealOpenHmacError
This error occurs when the envelope seal open hmac check fails HMAC check in seal open failed.
IncompatibleEnvelopeModeError
This error occurs when attempting to open an envelope of the wrong type (base mode, custom identifier)
OprfError(Error)
Error from the OPRF evaluation
OprfInternalError(InternalError)
Error from the OPRF evaluation
Implementations§
Source§impl InternalError
impl InternalError
Sourcepub fn into_custom<T>(self) -> InternalError<T>
pub fn into_custom<T>(self) -> InternalError<T>
Convert InternalError<Infallible> into InternalError<T>
Trait Implementations§
Source§impl<T: Clone> Clone for InternalError<T>
impl<T: Clone> Clone for InternalError<T>
Source§fn clone(&self) -> InternalError<T>
fn clone(&self) -> InternalError<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for InternalError<T>
impl<T: Debug> Debug for InternalError<T>
Source§impl<T> Display for InternalError<T>where
T: Display,
impl<T> Display for InternalError<T>where
T: Display,
Source§impl<T: Error> Error for InternalError<T>
Available on crate feature std only.
impl<T: Error> Error for InternalError<T>
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for InternalError
impl From<Error> for InternalError
Source§impl<T> From<InternalError<T>> for ProtocolError<T>
impl<T> From<InternalError<T>> for ProtocolError<T>
Source§fn from(e: InternalError<T>) -> ProtocolError<T>
fn from(e: InternalError<T>) -> ProtocolError<T>
Converts to this type from the input type.
Source§impl<T: Hash> Hash for InternalError<T>
impl<T: Hash> Hash for InternalError<T>
Source§impl<T: Ord> Ord for InternalError<T>
impl<T: Ord> Ord for InternalError<T>
Source§fn cmp(&self, other: &InternalError<T>) -> Ordering
fn cmp(&self, other: &InternalError<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for InternalError<T>
impl<T: PartialEq> PartialEq for InternalError<T>
Source§impl<T: PartialOrd> PartialOrd for InternalError<T>
impl<T: PartialOrd> PartialOrd for InternalError<T>
impl<T: Copy> Copy for InternalError<T>
impl<T: Eq> Eq for InternalError<T>
impl<T> StructuralPartialEq for InternalError<T>
Auto Trait Implementations§
impl<T> Freeze for InternalError<T>where
T: Freeze,
impl<T> RefUnwindSafe for InternalError<T>where
T: RefUnwindSafe,
impl<T> Send for InternalError<T>where
T: Send,
impl<T> Sync for InternalError<T>where
T: Sync,
impl<T> Unpin for InternalError<T>where
T: Unpin,
impl<T> UnwindSafe for InternalError<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more