aboutsummaryrefslogtreecommitdiff
path: root/src/libs/intertrait/cast/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/intertrait/cast/error.rs')
-rw-r--r--src/libs/intertrait/cast/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libs/intertrait/cast/error.rs b/src/libs/intertrait/cast/error.rs
index a834c05..e6d86a5 100644
--- a/src/libs/intertrait/cast/error.rs
+++ b/src/libs/intertrait/cast/error.rs
@@ -1,9 +1,16 @@
+use crate::libs::intertrait::{CasterError, GetCasterError};
+
#[derive(thiserror::Error, Debug)]
pub enum CastError
{
+ #[error("Failed to get caster")]
+ GetCasterFailed(#[from] GetCasterError),
+
#[error("Failed to cast from trait {from} to trait {to}")]
CastFailed
{
+ #[source]
+ source: CasterError,
from: &'static str,
to: &'static str,
},