pub enum ThresholdError {
Show 17 variants
ThresholdTooLow {
threshold: usize,
},
ThresholdExceedsTotal {
threshold: usize,
total: usize,
},
InvalidThreshold {
threshold: usize,
total: usize,
},
InsufficientShares {
required: usize,
provided: usize,
},
InvalidShareIndex {
index: usize,
max: usize,
},
DuplicateShareIndex {
index: usize,
},
ShareVerificationFailed {
participant: u16,
},
InvalidShareFormat,
InvalidShare {
reason: String,
},
InvalidCommitment,
DkgError(String),
SigningError(String),
InvalidParticipant(u16),
MissingParticipant(u16),
InvalidSignature,
SerializationError(String),
InternalError(String),
}Expand description
Errors that can occur in threshold operations.
Variants§
ThresholdTooLow
Threshold must be at least 1.
ThresholdExceedsTotal
Threshold cannot exceed total number of shares.
InvalidThreshold
Invalid threshold parameters (legacy variant).
Not enough shares for reconstruction.
Share index is out of range.
Duplicate share indices detected.
Share verification failed.
Invalid share format.
Invalid share data with reason.
InvalidCommitment
Invalid commitment.
DkgError(String)
DKG protocol error.
SigningError(String)
Signing protocol error.
InvalidParticipant(u16)
Invalid participant identifier.
MissingParticipant(u16)
Missing participant in round.
InvalidSignature
Invalid signature.
SerializationError(String)
Serialization error.
InternalError(String)
Internal error.
Trait Implementations§
Source§impl Debug for ThresholdError
impl Debug for ThresholdError
Source§impl Display for ThresholdError
impl Display for ThresholdError
Source§impl Error for ThresholdError
impl Error for ThresholdError
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()
Auto Trait Implementations§
impl Freeze for ThresholdError
impl RefUnwindSafe for ThresholdError
impl Send for ThresholdError
impl Sync for ThresholdError
impl Unpin for ThresholdError
impl UnwindSafe for ThresholdError
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