1 2 3 4 5 6 7 8 9 10 11 12 13 14
use thiserror::Error; use crate::components::Components; use crate::resources::resource::Resource; #[derive(Debug, Error)] pub enum BbEcsError { #[error("attempted to cast component from {from:?} to {to:?}")] CastingComponents { from: Components, to: Components }, #[error("attempted to cast resource from {from:?} to {to:?}")] CastingResource { from: Resource, to: &'static str }, #[error("you need to register before inserting components")] NeedToRegister, }