use serde::*;
use wings::*;
pub mod asset;
pub mod input;
pub mod math;
pub mod physics;
pub mod player;
pub mod timing;
#[derive(Copy, Clone, Debug)]
#[export_type]
pub struct Client;
#[derive(Copy, Clone, Debug)]
#[export_type]
pub struct Server;
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EngineError(String);
impl<T: Into<Box<dyn std::error::Error>>> From<T> for EngineError {
fn from(value: T) -> Self {
Self(format!("{:?}", value.into()))
}
}
#[system_trait(host)]
pub trait Logger: 'static {
#[global(global_log)]
fn log(&self, level: LogLevel, message: &str);
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
#[export_type]
pub enum LogLevel {
Trace,
Debug,
Info,
Warn,
Error,
}