pub enum MeshError {
Format(String),
InvalidBlock(String),
CrcMismatch,
UnsupportedVersion(u16),
Crypto(String),
NotInitialized,
Unicode(String),
Registry(String),
Io(Error),
Json(Error),
}Expand description
The single error type for the crate. Every fallible public API returns this; readers of external data (binary/unicode/registry) must never panic, so all malformed-input paths funnel here.
Variants§
Format(String)
Binary container is malformed (bad magic, out-of-bounds directory, truncated payload, …).
InvalidBlock(String)
A block failed validation (e.g. atlas size does not match pixels).
CrcMismatch
A block payload’s CRC32 did not match the directory entry.
UnsupportedVersion(u16)
The binary container version is not supported by this build.
Crypto(String)
Encryption/decryption failed (wrong key, tampered ciphertext, or a key was required but not supplied).
NotInitialized
An operation required the process-wide keyring before init.
Unicode(String)
The Unicode (PUA plane 15/16 + tag char) encoding was malformed.
Registry(String)
Registry (content-addressed store) failure.
Io(Error)
Filesystem I/O failure.
Json(Error)
JSON (de)serialization failure.
Trait Implementations§
Source§impl Error for MeshError
impl Error for MeshError
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()