Trait bevy_reflect::GetTypeRegistration

source ·
pub trait GetTypeRegistration: 'static {
    // Required method
    fn get_type_registration() -> TypeRegistration;

    // Provided method
    fn register_type_dependencies(registry: &mut TypeRegistry) { ... }
}
Expand description

A trait which allows a type to generate its TypeRegistration for registration into the TypeRegistry.

This trait is automatically implemented for items using #[derive(Reflect)]. The macro also allows TypeData to be more easily registered.

See the crate-level documentation for more information on type registration.

Required Methods§

source

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.

Provided Methods§

source

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type.

This method is called by TypeRegistry::register to register any other required types. Often, this is done for fields of structs and enum variants to ensure all types are properly registered.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl GetTypeRegistration for &'static str

source§

impl GetTypeRegistration for &'static Path

source§

impl GetTypeRegistration for EulerRot
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for Cow<'static, str>

source§

impl GetTypeRegistration for Cow<'static, Path>

source§

impl GetTypeRegistration for bool
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for char
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for f32
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for f64
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for i8
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for i16
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for i32
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for i64
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for i128
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for isize
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for u8
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for u16
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for u32
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for u64
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for u128
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for ()

source§

impl GetTypeRegistration for usize
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for BVec2
where Self: Any + Send + Sync, bool: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for BVec3
where Self: Any + Send + Sync, bool: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for BVec4
where Self: Any + Send + Sync, bool: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for BVec3A
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for BVec4A
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for Affine2
where Self: Any + Send + Sync, Mat2: FromReflect + TypePath + RegisterForReflection, Vec2: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Affine3A
where Self: Any + Send + Sync, Mat3A: FromReflect + TypePath + RegisterForReflection, Vec3A: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Mat3
where Self: Any + Send + Sync, Vec3: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Mat2
where Self: Any + Send + Sync, Vec2: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Mat3A
where Self: Any + Send + Sync, Vec3A: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Mat4
where Self: Any + Send + Sync, Vec4: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Quat
where Self: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Vec3A
where Self: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Vec4
where Self: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Vec2
where Self: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for Vec3
where Self: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DAffine2
where Self: Any + Send + Sync, DMat2: FromReflect + TypePath + RegisterForReflection, DVec2: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DAffine3
where Self: Any + Send + Sync, DMat3: FromReflect + TypePath + RegisterForReflection, DVec3: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DMat2
where Self: Any + Send + Sync, DVec2: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DMat3
where Self: Any + Send + Sync, DVec3: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DMat4
where Self: Any + Send + Sync, DVec4: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DQuat
where Self: Any + Send + Sync, f64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DVec2
where Self: Any + Send + Sync, f64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DVec3
where Self: Any + Send + Sync, f64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for DVec4
where Self: Any + Send + Sync, f64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for IVec2
where Self: Any + Send + Sync, i32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for IVec3
where Self: Any + Send + Sync, i32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for IVec4
where Self: Any + Send + Sync, i32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for I64Vec2
where Self: Any + Send + Sync, i64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for I64Vec3
where Self: Any + Send + Sync, i64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for I64Vec4
where Self: Any + Send + Sync, i64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for UVec2
where Self: Any + Send + Sync, u32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for UVec3
where Self: Any + Send + Sync, u32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for UVec4
where Self: Any + Send + Sync, u32: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for U64Vec2
where Self: Any + Send + Sync, u64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for U64Vec3
where Self: Any + Send + Sync, u64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for U64Vec4
where Self: Any + Send + Sync, u64: FromReflect + TypePath + RegisterForReflection,

source§

impl GetTypeRegistration for SmolStr
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for Uuid
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for String
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for TypeId
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for RangeFull
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for Duration
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for OsString
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for PathBuf
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for Instant
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroI8
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroI16
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroI32
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroI64
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroI128
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroIsize
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroU8
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroU16
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroU32
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroU64
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroU128
where Self: Any + Send + Sync,

source§

impl GetTypeRegistration for NonZeroUsize
where Self: Any + Send + Sync,

source§

impl<A: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A,)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration, H: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G, H)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration, H: Reflect + TypePath + GetTypeRegistration, I: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G, H, I)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration, H: Reflect + TypePath + GetTypeRegistration, I: Reflect + TypePath + GetTypeRegistration, J: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration, H: Reflect + TypePath + GetTypeRegistration, I: Reflect + TypePath + GetTypeRegistration, J: Reflect + TypePath + GetTypeRegistration, K: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<A: Reflect + TypePath + GetTypeRegistration, B: Reflect + TypePath + GetTypeRegistration, C: Reflect + TypePath + GetTypeRegistration, D: Reflect + TypePath + GetTypeRegistration, E: Reflect + TypePath + GetTypeRegistration, F: Reflect + TypePath + GetTypeRegistration, G: Reflect + TypePath + GetTypeRegistration, H: Reflect + TypePath + GetTypeRegistration, I: Reflect + TypePath + GetTypeRegistration, J: Reflect + TypePath + GetTypeRegistration, K: Reflect + TypePath + GetTypeRegistration, L: Reflect + TypePath + GetTypeRegistration> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<K, V> GetTypeRegistration for BTreeMap<K, V>

source§

impl<K, V, S> GetTypeRegistration for HashMap<K, V, S>

source§

impl<K, V, S> GetTypeRegistration for HashMap<K, V, S>

source§

impl<T> GetTypeRegistration for Option<T>
where Self: Any + Send + Sync, T: TypePath + FromReflect + RegisterForReflection,

source§

impl<T> GetTypeRegistration for BinaryHeap<T>
where Self: Any + Send + Sync, T: TypePath + Clone,

source§

impl<T> GetTypeRegistration for BTreeSet<T>
where Self: Any + Send + Sync, T: TypePath + Ord + Eq + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for Arc<T>
where Self: Any + Send + Sync, T: TypePath + Send + Sync,

source§

impl<T> GetTypeRegistration for Saturating<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for Wrapping<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for Range<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for RangeFrom<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for RangeInclusive<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for RangeTo<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T> GetTypeRegistration for RangeToInclusive<T>
where Self: Any + Send + Sync, T: TypePath + Clone + Send + Sync,

source§

impl<T, E> GetTypeRegistration for Result<T, E>
where Self: Any + Send + Sync, T: TypePath + FromReflect + RegisterForReflection, E: TypePath + FromReflect + RegisterForReflection,

source§

impl<T, S> GetTypeRegistration for HashSet<T, S>
where Self: Any + Send + Sync, T: TypePath + Hash + Eq + Clone + Send + Sync, S: TypePath + TypePath + Clone + Send + Sync,

source§

impl<T, S> GetTypeRegistration for HashSet<T, S>
where Self: Any + Send + Sync, T: TypePath + Hash + Eq + Clone + Send + Sync, S: TypePath + TypePath + Clone + Send + Sync,

source§

impl<T: Array + TypePath + Send + Sync> GetTypeRegistration for SmallVec<T>

source§

impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> GetTypeRegistration for Cow<'static, [T]>

source§

impl<T: FromReflect + TypePath + GetTypeRegistration> GetTypeRegistration for VecDeque<T>

source§

impl<T: FromReflect + TypePath + GetTypeRegistration> GetTypeRegistration for Vec<T>

source§

impl<T: Reflect + TypePath + GetTypeRegistration, const N: usize> GetTypeRegistration for [T; N]

Implementors§