pub enum ToolError {
Bip39(Bip39Error),
Base58(Error),
Sign(SignError),
Keypair(KeypairError),
Gen(GenError),
TransactionParse(TransactionParseError),
Deserialize(DeserializeError),
Io(IoError),
Verify(VerifyError),
FileExists {
path: String,
},
InvalidInput(String),
ConfigurationError(String),
}Expand description
Top-level error every command bubbles up.
Routing rules
Sign– I/O with context (IoWithPath), key parsing/format/length, signing domain errorsTransactionParse– user input/output format issues (JSON/Base64/Base58, blockhash, etc.)Deserialize– internal raw transaction deserialization (binary → domain)Bip39,Bincode,Base58– wrapped library errorsInvalidInput– CLI-level validation (mutually exclusive args, stdin forbidden, etc.)
Variants§
Bip39(Bip39Error)
Base58(Error)
Sign(SignError)
Keypair(KeypairError)
Gen(GenError)
TransactionParse(TransactionParseError)
Deserialize(DeserializeError)
Io(IoError)
Verify(VerifyError)
FileExists
InvalidInput(String)
ConfigurationError(String)
Trait Implementations§
Source§impl AsExitCode for ToolError
impl AsExitCode for ToolError
fn as_exit_code(&self) -> i32
Source§impl Error for ToolError
impl Error for ToolError
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<Bip39Error> for ToolError
impl From<Bip39Error> for ToolError
Source§fn from(source: Bip39Error) -> Self
fn from(source: Bip39Error) -> Self
Converts to this type from the input type.
Source§impl From<DeserializeError> for ToolError
impl From<DeserializeError> for ToolError
Source§fn from(source: DeserializeError) -> Self
fn from(source: DeserializeError) -> Self
Converts to this type from the input type.
Source§impl From<KeypairError> for ToolError
impl From<KeypairError> for ToolError
Source§fn from(source: KeypairError) -> Self
fn from(source: KeypairError) -> Self
Converts to this type from the input type.
Source§impl From<TransactionParseError> for ToolError
impl From<TransactionParseError> for ToolError
Source§fn from(source: TransactionParseError) -> Self
fn from(source: TransactionParseError) -> Self
Converts to this type from the input type.
Source§impl From<VerifyError> for ToolError
impl From<VerifyError> for ToolError
Source§fn from(source: VerifyError) -> Self
fn from(source: VerifyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolError
impl !RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl !UnwindSafe for ToolError
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