bevy_reflect/info/error.rs
1use crate::ReflectKind;
2use thiserror::Error;
3
4/// A [`TypeInfo`]-specific error.
5///
6/// [`TypeInfo`]: crate::info::TypeInfo
7#[derive(Debug, Error)]
8pub enum TypeInfoError {
9 /// Caused when a type was expected to be of a certain [kind], but was not.
10 ///
11 /// [kind]: ReflectKind
12 #[error("kind mismatch: expected {expected:?}, received {received:?}")]
13 KindMismatch {
14 /// Expected kind.
15 expected: ReflectKind,
16 /// Received kind.
17 received: ReflectKind,
18 },
19}