pub enum PwrError {
Show 17 variants
Io(Error),
TomlParse {
path: String,
source: Error,
},
TomlSerialize(Error),
Json(Error),
Bincode(EncodeError),
Config(String),
NoConfig,
Framing(String),
Protocol(String),
Crypto(String),
Auth(String),
Network(String),
Timeout(String),
NotFound(String),
AlreadyExists(String),
Corrupted(String),
Uuid(Error),
}Expand description
Unified error type for all pwr operations.
Covers I/O failures, serialization errors, protocol violations, cryptographic failures, authentication problems, network issues, and storage-layer errors on the server side.
Variants§
Io(Error)
File or directory I/O operation failed.
TomlParse
TOML configuration file could not be parsed.
TomlSerialize(Error)
TOML serialization failed.
Json(Error)
JSON serialization or deserialization failed.
Bincode(EncodeError)
Bincode serialization or deserialization failed (wire protocol).
Config(String)
Client or server configuration is missing or invalid.
NoConfig
No configuration found — user must run init first.
Framing(String)
Protocol framing error: magic bytes mismatch, truncated frame, or message exceeding size limit.
Protocol(String)
Received an unexpected or invalid protocol message.
Crypto(String)
Cryptographic operation failed (key generation, encryption, decryption, or hash computation).
Auth(String)
Authentication with the server failed (wrong token, expired credentials, or too many attempts).
Network(String)
Network connection could not be established or was lost.
Timeout(String)
Operation timed out.
NotFound(String)
Requested project does not exist on the server.
AlreadyExists(String)
Project already exists (cannot overwrite without explicit flag).
Corrupted(String)
Stored project data is corrupted or unreadable.
Uuid(Error)
UUID parsing or formatting failed.
Trait Implementations§
Source§impl Error for PwrError
impl Error for PwrError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()