pub enum CoreError {
InvalidKeyLength {
expected: usize,
got: usize,
},
InvalidMultikey(String),
UnknownMulticodec(String),
InvalidDid(String),
InvalidSignatureLength {
expected: usize,
got: usize,
},
Crypto(String),
Json(String),
Threshold(String),
}Expand description
Errors returned by the protocol core. Kept small and stable so the WASM and UniFFI/C-FFI wrappers can surface them uniformly across languages.
Variants§
InvalidKeyLength
A key had the wrong length for its algorithm.
InvalidMultikey(String)
A multikey string was malformed (bad prefix, bad base58, too short).
UnknownMulticodec(String)
The multicodec prefix did not match a supported algorithm.
InvalidDid(String)
A DID string was malformed or used an unsupported method.
InvalidSignatureLength
A signature length was wrong.
Crypto(String)
A cryptographic operation failed (keygen RNG, parse, etc.).
Json(String)
JSON was malformed or had an unexpected shape.
Threshold(String)
A FROST threshold-signing operation failed (bad share, wrong participant count, mismatched commitments).
Trait Implementations§
impl Eq for CoreError
Source§impl Error for CoreError
impl Error for CoreError
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()
impl StructuralPartialEq for CoreError
Auto Trait Implementations§
impl Forget for CoreError
impl Freeze for CoreError
impl Move for CoreError
impl RefUnwindSafe for CoreError
impl Send for CoreErrorwhere
RawVecInner: Send,
impl Sync for CoreErrorwhere
RawVecInner: Sync,
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
impl UnwindSafe for CoreErrorwhere
RawVecInner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.