[]Trait bevy::prelude::Reflect

pub trait Reflect: Send + Sync + Any {
    pub fn type_name(&self) -> &str;
pub fn any(&self) -> &(dyn Any + 'static);
pub fn any_mut(&mut self) -> &mut (dyn Any + 'static);
pub fn apply(&mut self, value: &(dyn Reflect + 'static));
pub fn set(
        &mut self,
        value: Box<dyn Reflect + 'static, Global>
    ) -> Result<(), Box<dyn Reflect + 'static, Global>>;
pub fn reflect_ref(&self) -> ReflectRef<'_>;
pub fn reflect_mut(&mut self) -> ReflectMut<'_>;
pub fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>;
pub fn reflect_hash(&self) -> Option<u64>;
pub fn reflect_partial_eq(
        &self,
        _value: &(dyn Reflect + 'static)
    ) -> Option<bool>;
pub fn serializable(&self) -> Option<Serializable<'_>>; }

A reflected rust type.

Required methods

pub fn type_name(&self) -> &str

pub fn any(&self) -> &(dyn Any + 'static)

pub fn any_mut(&mut self) -> &mut (dyn Any + 'static)

pub fn apply(&mut self, value: &(dyn Reflect + 'static))

pub fn set(
    &mut self,
    value: Box<dyn Reflect + 'static, Global>
) -> Result<(), Box<dyn Reflect + 'static, Global>>

pub fn reflect_ref(&self) -> ReflectRef<'_>

pub fn reflect_mut(&mut self) -> ReflectMut<'_>

pub fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>

pub fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type) if hashing is supported. Otherwise None will be returned.

pub fn reflect_partial_eq(
    &self,
    _value: &(dyn Reflect + 'static)
) -> Option<bool>

Returns a "partial equal" comparison result if comparison is supported. Otherwise None will be returned.

pub fn serializable(&self) -> Option<Serializable<'_>>

Returns a serializable value, if serialization is supported. Otherwise None will be returned.

Loading content...

Implementations

impl dyn Reflect + 'static

pub fn downcast<T>(
    self: Box<dyn Reflect + 'static, Global>
) -> Result<Box<T, Global>, Box<dyn Reflect + 'static, Global>> where
    T: Reflect

pub fn take<T>(
    self: Box<dyn Reflect + 'static, Global>
) -> Result<T, Box<dyn Reflect + 'static, Global>> where
    T: Reflect

pub fn is<T>(&self) -> bool where
    T: Reflect

pub fn downcast_ref<T>(&self) -> Option<&T> where
    T: Reflect

pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
    T: Reflect

Trait Implementations

impl Debug for dyn Reflect + 'static

impl GetPath for dyn Reflect + 'static

Implementations on Foreign Types

impl Reflect for u8

impl Reflect for u16

impl Reflect for u64

impl Reflect for u32

impl<T> Reflect for HashSet<T, RandomState> where
    T: 'static + Clone + Eq + Send + Sync + Hash + for<'de> Deserialize<'de> + Serialize

impl Reflect for i8

impl<T> Reflect for SmallVec<T> where
    T: 'static + Send + Sync + Array,
    <T as Array>::Item: Reflect,
    <T as Array>::Item: Clone

impl Reflect for usize

impl<T> Reflect for Option<T> where
    T: 'static + Reflect + Clone + for<'de> Deserialize<'de> + Serialize

impl Reflect for bool

impl Reflect for u128

impl Reflect for f32

impl Reflect for i16

impl Reflect for i64

impl<T> Reflect for Range<T> where
    T: 'static + Clone + Send + Sync + for<'de> Deserialize<'de> + Serialize

impl Reflect for isize

impl<T> Reflect for Vec<T, Global> where
    T: Reflect

impl<K, V> Reflect for HashMap<K, V, RandomState> where
    V: Reflect + Clone,
    K: Reflect + Clone + Eq + Hash

impl Reflect for String

impl Reflect for i128

impl Reflect for f64

impl Reflect for i32

Loading content...

Implementors

impl Reflect for HandleId

impl Reflect for WindowOrigin

impl Reflect for IndexFormat

impl Reflect for PrimitiveTopology

impl Reflect for SpriteResizeMode

impl Reflect for AlignContent

impl Reflect for AlignItems

impl Reflect for AlignSelf

impl Reflect for Direction

impl Reflect for Display

impl Reflect for FlexDirection

impl Reflect for FlexWrap

impl Reflect for JustifyContent

impl Reflect for PositionType

impl Reflect for Val

impl Reflect for AssetPathId

impl Reflect for LabelId

impl Reflect for SourcePathId

impl Reflect for Labels

impl Reflect for Timer

impl Reflect for Entity

impl Reflect for Mat3

impl Reflect for Mat4

impl Reflect for Quat

impl Reflect for Vec2

impl Reflect for Vec3

impl Reflect for Vec4

impl Reflect for Light

impl Reflect for DynamicList

impl Reflect for DynamicMap

impl Reflect for DynamicStruct

impl Reflect for DynamicTupleStruct

impl Reflect for Camera

impl Reflect for OrthographicProjection

impl Reflect for PerspectiveProjection

impl Reflect for VisibleEntities

impl Reflect for Color

impl Reflect for Draw

impl Reflect for Visible

impl Reflect for PipelineSpecialization

impl Reflect for RenderPipeline

impl Reflect for RenderPipelines

impl Reflect for ShaderSpecialization

impl Reflect for VertexBufferDescriptor

impl Reflect for MainPass

impl Reflect for Sprite

impl Reflect for Children

impl Reflect for GlobalTransform

impl Reflect for Parent

impl Reflect for PreviousParent

impl Reflect for Transform

impl Reflect for Node

impl Reflect for Style

impl<T> Reflect for Handle<T> where
    T: Asset

impl<T> Reflect for Rect<T> where
    T: Reflect

impl<T> Reflect for Size<T> where
    T: Reflect

Loading content...