#[non_exhaustive]pub enum FrostError {
ThresholdNotMet {
code: ErrorCode,
needed: u16,
available: u16,
},
InvalidShare {
code: ErrorCode,
message: String,
},
Session {
code: ErrorCode,
message: String,
},
Commitment {
code: ErrorCode,
message: String,
},
Aggregation {
code: ErrorCode,
message: String,
},
InvalidConfig {
code: ErrorCode,
message: String,
},
Dkg {
code: ErrorCode,
message: String,
},
DuplicateParticipant {
code: ErrorCode,
identifier: u16,
},
UnknownParticipant {
code: ErrorCode,
identifier: u16,
},
}Expand description
FROST protocol errors.
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.
ThresholdNotMet
Session
Commitment
Aggregation
InvalidConfig
Dkg
DuplicateParticipant
UnknownParticipant
Implementations§
Source§impl FrostError
impl FrostError
pub fn threshold_not_met(needed: u16, available: u16) -> Self
pub fn session(message: impl Into<String>) -> Self
pub fn commitment(message: impl Into<String>) -> Self
pub fn aggregation(message: impl Into<String>) -> Self
pub fn invalid_config(message: impl Into<String>) -> Self
pub fn dkg(message: impl Into<String>) -> Self
pub fn duplicate_participant(identifier: u16) -> Self
pub fn unknown_participant(identifier: u16) -> Self
pub fn code(&self) -> ErrorCode
Trait Implementations§
Source§impl Debug for FrostError
impl Debug for FrostError
Source§impl Display for FrostError
impl Display for FrostError
Source§impl Error for FrostError
impl Error for FrostError
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<FrostError> for KeepError
impl From<FrostError> for KeepError
Source§fn from(source: FrostError) -> Self
fn from(source: FrostError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for FrostError
impl Freeze for FrostError
impl Move for FrostError
impl RefUnwindSafe for FrostError
impl Send for FrostError
impl Sync for FrostError
impl Unpin for FrostError
impl UnsafeUnpin for FrostError
impl UnwindSafe for FrostError
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