pub enum StateStoreError {
KeyNotFound(String),
SerializationError(String),
StorageError(String),
Other(String),
}Expand description
Errors that can occur when interacting with a state store.
§Note on Missing Keys
Missing keys are typically represented as Ok(None) from get(), not as
KeyNotFound errors. The KeyNotFound variant is available for custom
implementations that need to distinguish between “key doesn’t exist” and
other error conditions, but the standard trait methods prefer returning
Option values.
Variants§
KeyNotFound(String)
The requested key was not found in the store.
Note: Standard implementations return Ok(None) for missing keys instead
of this error. This variant is provided for custom implementations that
need explicit error-based handling of missing keys.
SerializationError(String)
Failed to serialize or deserialize data.
This error typically occurs when stored data cannot be parsed or when data being stored cannot be serialized to the expected format.
StorageError(String)
Failed to read or write to the underlying storage.
This error indicates I/O failures, database errors, or other storage backend issues.
Other(String)
Generic error for other failures.
Use this for errors that don’t fit the other categories.