#![doc = include_str!("../README.md")]
extern crate tezos_smart_rollup_debug as debug;
extern crate tezos_smart_rollup_host as host;
use thiserror::Error;
#[derive(Error, Copy, Eq, PartialEq, Clone, Debug)]
pub enum StorageError {
#[error("Invalid accounts storage path")]
InvalidAccountsPath,
#[error("Transaction storage is already in use")]
StorageInUse,
#[error("No storage")]
NoStorage,
#[error("No current transaction to commit or roll back")]
NoCurrentTransaction,
#[error("Path error")]
PathError(host::path::PathError),
#[error("Runtrime error")]
RuntimeError(host::runtime::RuntimeError),
}
impl From<host::path::PathError> for StorageError {
fn from(path_error: host::path::PathError) -> Self {
StorageError::PathError(path_error)
}
}
impl From<host::runtime::RuntimeError> for StorageError {
fn from(runtime_error: host::runtime::RuntimeError) -> Self {
StorageError::RuntimeError(runtime_error)
}
}
mod layer;
pub mod storage;