bevy_reflect

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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,

Available on crate feature glam only.
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,

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature glam only.
Source§

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

Available on crate feature smol_str only.
Source§

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

Available on crate feature uuid only.
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>

Available on crate feature smallvec only.
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§