1pub mod icrc;
2pub mod memory;
3pub mod wasm;
4
5use crate::{
6 cdk::api::performance_counter,
7 model::{memory::MemoryError, wasm::WasmRegistryError},
8};
9use std::cell::RefCell;
10use thiserror::Error as ThisError;
11
12#[derive(Debug, ThisError)]
17pub enum ModelError {
18 #[error(transparent)]
19 MemoryError(#[from] MemoryError),
20
21 #[error(transparent)]
22 WasmRegistryError(#[from] WasmRegistryError),
23}
24
25thread_local! {
26 pub static PERF_LAST: RefCell<u64> = RefCell::new(performance_counter(1));
27}