pub enum Error {
Show 16 variants
Field(Error),
IdNotLength4(usize),
IncompleteGroup(usize),
InvalidLength(usize),
InvalidChar(char),
InvalidCase(Case, char),
InvalidChecksum {
checksum: &'static str,
string: String,
},
InvalidThreshold(char),
InvalidThresholdN(usize),
InvalidShareIndex(Fe),
MismatchedLength(usize, usize),
MismatchedHrp(String, String),
MismatchedThreshold(usize, usize),
MismatchedId(String, String),
RepeatedIndex(Fe),
ThresholdNotPassed {
threshold: usize,
n_shares: usize,
},
}
Variants§
Field(Error)
Error related to a single bech32 character
IdNotLength4(usize)
Identifier had wrong length when creating a share
IncompleteGroup(usize)
When translating from u5 to u8, there was an incomplete group of size greater than 4 bits, meaning an entirely extraneous character.
InvalidLength(usize)
Tried a codex32 string of an illegal length
InvalidChar(char)
Tried to decode a character which was not part of the bech32 alphabet, or, if in the HRP, was not ASCII.
InvalidCase(Case, char)
Tried to decode a character but its case did not match the expected case
InvalidChecksum
String had an invalid checksum
Fields
InvalidThreshold(char)
Threshold was not an allowed value (2 through 9, or 0)
InvalidThresholdN(usize)
Threshold was not an allowed value (2 through 9, or 0)
Share index was not an allowed value (only S if the threshold is 0, otherwise anything goes)
MismatchedLength(usize, usize)
A set of shares to be interpolated did not all have the same length
MismatchedHrp(String, String)
A set of shares to be interpolated did not all have the same HRP
MismatchedThreshold(usize, usize)
A set of shares to be interpolated did not all have the same threshold
MismatchedId(String, String)
A set of shares to be interpolated did not all have the same ID
RepeatedIndex(Fe)
A share index was repeated in the set of shares to interpolate.
ThresholdNotPassed
A set of shares to be interpolated did not have enough shares