Skip to main content

aura_anim_core/binding/
error.rs

1use crate::runtime::MotionError;
2
3/// Failure returned while applying a motion binding.
4#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
5pub enum MotionBindingError<S> {
6    /// The requested business state has no target value.
7    #[error("motion binding has no target for state {0:?}")]
8    MissingTarget(S),
9    /// Neither an exact transition nor a fallback factory was configured.
10    #[error("motion binding has no transition from {from:?} to {to:?}")]
11    MissingTransition {
12        /// Previously applied state.
13        from: S,
14        /// Requested state.
15        to: S,
16    },
17    /// The runtime rejected the supplied motion handle.
18    #[error(transparent)]
19    Motion(#[from] MotionError),
20}