#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("No such function in Wasm module")]
NoSuchFunction(String),
#[error("I/O Error: {0}")]
IO(#[from] std::io::Error),
#[error("WebAssembly failure: {0}")]
WasmMisc(String),
#[error("Error during host call: {0}")]
HostCallFailure(Box<dyn std::error::Error + Sync + Send>),
#[error("Initialization failed: {0}")]
InitFailed(String),
#[error("Guest call failure: {0}")]
GuestCallFailure(String),
#[error("Module replacement failed: {0}")]
ReplacementFailed(String),
#[error("WASM Provider failure: {0}")]
ProviderFailure(Box<dyn std::error::Error + Sync + Send>),
#[error("General: {0}")]
General(String),
}
#[cfg(test)]
mod tests {
#[allow(dead_code)]
fn needs_sync_send<T: Send + Sync>() {}
#[test]
fn assert_sync_send() {
needs_sync_send::<super::Error>();
}
}