rustywallet_export/
error.rs

1//! Error types for export operations.
2
3use thiserror::Error;
4
5/// Errors that can occur during export operations.
6#[derive(Debug, Error)]
7pub enum ExportError {
8    /// Invalid key
9    #[error("Invalid key: {0}")]
10    InvalidKey(String),
11
12    /// Encryption failed
13    #[error("Encryption failed: {0}")]
14    EncryptionFailed(String),
15
16    /// Serialization failed
17    #[error("Serialization failed: {0}")]
18    SerializationFailed(String),
19
20    /// Invalid network
21    #[error("Invalid network: {0}")]
22    InvalidNetwork(String),
23
24    /// Address generation failed
25    #[error("Address generation failed: {0}")]
26    AddressError(String),
27}
28
29/// Result type alias for export operations.
30pub type Result<T> = std::result::Result<T, ExportError>;