#[non_exhaustive]#[repr(C)]pub enum Error {
NoError = 0,
NonCanonicalFieldElement = 1,
PublicKeyBytesInvalid = 2,
SignatureInvalid = 3,
ContextTooLong = 4,
WrongTwist = 5,
}
Expand description
Extensible error type for all salty
operations.
This enum has a member NoError
with value zero, for use in the C API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoError = 0
Never occurs, simplifies C bindings
NonCanonicalFieldElement = 1
Bytes do not correspond to a canonical base field element
PublicKeyBytesInvalid = 2
Public key bytes invalid
SignatureInvalid = 3
Signature verification failed
ContextTooLong = 4
Context for prehashed signatures too long
WrongTwist = 5
Point is on other twist of curve
Trait Implementations§
source§impl PartialEq for Error
impl PartialEq for Error
impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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