[][src]Trait bevy_internal::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[src]

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

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

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

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

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

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

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

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

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>
[src]

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

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

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

Loading content...

Implementations

impl dyn Reflect + 'static[src]

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

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

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

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

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

Trait Implementations

impl Debug for dyn Reflect + 'static[src]

impl GetPath for dyn Reflect + 'static[src]

Implementations on Foreign Types

impl Reflect for u32[src]

impl Reflect for usize[src]

impl Reflect for String[src]

impl<T> Reflect for Vec<T, Global> where
    T: Reflect
[src]

impl Reflect for u16[src]

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

impl Reflect for i64[src]

impl Reflect for f64[src]

impl Reflect for i16[src]

impl Reflect for f32[src]

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

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

impl Reflect for i128[src]

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

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

impl Reflect for u64[src]

impl Reflect for i8[src]

impl Reflect for isize[src]

impl Reflect for u8[src]

impl Reflect for i32[src]

impl Reflect for u128[src]

impl Reflect for bool[src]

Loading content...

Implementors

impl Reflect for HandleId[src]

impl Reflect for AssetPathId[src]

impl Reflect for LabelId[src]

impl Reflect for SourcePathId[src]

impl Reflect for Labels[src]

impl Reflect for Timer[src]

impl Reflect for Entity[src]

impl Reflect for Mat3[src]

impl Reflect for Mat4[src]

impl Reflect for Quat[src]

impl Reflect for Vec2[src]

impl Reflect for Vec3[src]

impl Reflect for Vec4[src]

impl Reflect for DynamicList[src]

impl Reflect for DynamicMap[src]

impl Reflect for DynamicStruct[src]

impl Reflect for DynamicTupleStruct[src]

impl Reflect for Children[src]

impl Reflect for GlobalTransform[src]

impl Reflect for Parent[src]

impl Reflect for PreviousParent[src]

impl Reflect for Transform[src]

impl<T> Reflect for Handle<T> where
    T: Asset
[src]

impl<T> Reflect for Rect<T> where
    T: Reflect
[src]

impl<T> Reflect for Size<T> where
    T: Reflect
[src]

Loading content...