#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Request failed: {0}")]
RequestFailed(String),
#[error("No pool available. Have you initialized the HostPool or already shut it down?")]
NoPool,
}
impl From<Error> for wapc::errors::Error {
fn from(e: Error) -> Self {
wapc::errors::Error::General(e.to_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>();
}
}