#[non_exhaustive]pub enum StorageError {
Show 13 variants
ActionNotAllowed(String),
CannotCreateOrphan(Id),
MergeFailure(MergeError),
DeserializationError(Error),
IndexNotFound(Id),
InvalidData(String),
InvalidTimestamp(u64, u64),
InvalidSignature,
NonceReplay(Box<(PublicKey, u64)>),
NotFound(Id),
SerializationError(Error),
StoreError(Report),
UnexpectedId(Id),
}Expand description
Errors that can occur when working with the storage system.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ActionNotAllowed(String)
The requested action is not allowed.
CannotCreateOrphan(Id)
An attempt was made to create an orphan, i.e. an entity that has not
been registered as either a root or having a parent. This was probably
cause by calling save() without calling add_child_to() first.
MergeFailure(MergeError)
A merge operation failed.
This typically indicates that no merge function is registered for the
root entity type. Use #[app::state] macro or call
register_crdt_merge::<YourState>() to register a merge function.
The inner MergeError preserves the specific failure reason for
programmatic error handling.
DeserializationError(Error)
An error occurred during deserialization.
IndexNotFound(Id)
An index entry was not found for the specified entity. This would indicate a bug in the system.
InvalidData(String)
Invalid or corrupt data encountered.
InvalidTimestamp(u64, u64)
The provided timestamp for an action is invalid (too far in the future).
InvalidSignature
The provided signature for an action is invalid.
NonceReplay(Box<(PublicKey, u64)>)
A remote action was rejected due to an invalid (old or reused) nonce.
PublicKey is Boxed to reduce the enum’s size.
NotFound(Id)
The requested record was not found, but in the context it was asked for, it was expected to be found and so this represents an error or some kind of inconsistency in the stored data.
SerializationError(Error)
An error occurred during serialization.
StoreError(Report)
An error from the Store.
UnexpectedId(Id)
An unexpected ID was encountered.
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
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()