Reflect Kind Enum (src/kind.rs)

bevy · crates/bevy_reflect/src/kind.rs · rust · Apache-2.0
dev-tools, lang:rust, fw:bevy, tag:knn-classified, tag:reflection, tag:enum, tag:type-system

Defines ReflectKind enum classifying reflected types (struct, list, map, etc.) and a mismatch error. Reuse when matching or validating reflected type kinds in Bevy reflection.

// Source: https://github.com/bevyengine/bevy | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
use alloc::boxed::Box;
use thiserror::Error;

#[cfg(feature = "functions")]
use crate::func::Function;
use crate::{
    array::Array, enums::Enum, list::List, map::Map, set::Set, structs::Struct, tuple::Tuple,
    tuple_struct::TupleStruct, PartialReflect,
};

/// An enumeration of the "kinds" of a reflected type.
///
/// Each kind corresponds to a specific reflection trait,
/// such as [`Struct`] or [`List`],
/// which itself corresponds to the kind or structure of a type.
///
/// A [`ReflectKind`] is obtained via [`PartialReflect::reflect_kind`],
/// or via [`ReflectRef::kind`],[`ReflectMut::kind`] or [`ReflectOwned::kind`].
#[derive(Debug, PartialEq, Eq, C

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key