use thiserror::Error;
#[derive(Error, Debug)]
pub enum WriteError<TStorageError> {
#[error(transparent)]
StorageError(#[from] TStorageError),
#[error("Change intercepted")]
Intercepted,
#[error("Key not found: {0}")]
KeyNotFound(String),
}
pub type WriteResult<T, E> = std::result::Result<T, WriteError<E>>;
pub type FieldError<TStorageError> = WriteError<TStorageError>;
pub type ReactiveMapError<TStorageError> = WriteError<TStorageError>;
pub type ReactiveFieldResult<T, E> = WriteResult<T, E>;
pub type ReactiveMapResult<T, E> = WriteResult<T, E>;