pub enum CheckpointError {
Serialize(Box<dyn Error + Send + Sync>),
Deserialize(Box<dyn Error + Send + Sync>),
SchemaMigration {
from: u32,
to: u32,
reason: String,
},
Storage(Box<dyn Error + Send + Sync>),
Database(Box<dyn Error + Send + Sync>),
Serialization(Box<dyn Error + Send + Sync>),
NotFound {
thread_id: String,
checkpoint_id: String,
},
PoolExhausted,
}Expand description
Checkpoint operation errors
Represents all possible errors that can occur during checkpoint operations, including serialization, storage, and schema migration failures.
Variants§
Serialize(Box<dyn Error + Send + Sync>)
Serialization failed
Occurs when converting checkpoint data to a serialized format (JSON/MessagePack).
Deserialize(Box<dyn Error + Send + Sync>)
Deserialization failed
Occurs when parsing serialized data back into checkpoint structures.
SchemaMigration
Schema migration failed
Occurs when migrating checkpoint data between incompatible schema versions.
Fields
Storage(Box<dyn Error + Send + Sync>)
Storage operation error
Occurs when underlying storage backend fails (database, filesystem, etc.).
Database(Box<dyn Error + Send + Sync>)
Database operation error
Occurs when database operations fail (query, connection, transaction, etc.).
Serialization(Box<dyn Error + Send + Sync>)
Serialization error (alias for Serialize)
This variant is an alias for Serialize and exists for compatibility
with external code that expects this name.
NotFound
Checkpoint not found
Occurs when attempting to retrieve a non-existent checkpoint.
PoolExhausted
Connection pool exhausted
Occurs when no database connections are available in the pool.
Implementations§
Source§impl CheckpointError
impl CheckpointError
Sourcepub fn serialize_msg(msg: String) -> Self
pub fn serialize_msg(msg: String) -> Self
Create a serialization error from a string message
Sourcepub fn deserialize_msg(msg: String) -> Self
pub fn deserialize_msg(msg: String) -> Self
Create a deserialization error from a string message
Sourcepub fn storage_msg(msg: String) -> Self
pub fn storage_msg(msg: String) -> Self
Create a storage error from a string message
Sourcepub fn database_msg(msg: String) -> Self
pub fn database_msg(msg: String) -> Self
Create a database error from a string message
Trait Implementations§
Source§impl Debug for CheckpointError
impl Debug for CheckpointError
Source§impl Display for CheckpointError
impl Display for CheckpointError
Source§impl Error for CheckpointError
impl Error for CheckpointError
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()