bevy_reflect

Trait Struct

Source
pub trait Struct: PartialReflect {
    // Required methods
    fn field(&self, name: &str) -> Option<&dyn PartialReflect>;
    fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>;
    fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>;
    fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>;
    fn name_at(&self, index: usize) -> Option<&str>;
    fn field_len(&self) -> usize;
    fn iter_fields(&self) -> FieldIter<'_> ;
    fn clone_dynamic(&self) -> DynamicStruct;

    // Provided method
    fn get_represented_struct_info(&self) -> Option<&'static StructInfo> { ... }
}
Expand description

A trait used to power struct-like operations via reflection.

This trait uses the Reflect trait to allow implementors to have their fields be dynamically addressed by both name and index.

When using #[derive(Reflect)] on a standard struct, this trait will be automatically implemented. This goes for unit structs as well.

§Example

use bevy_reflect::{PartialReflect, Reflect, Struct};

#[derive(Reflect)]
struct Foo {
    bar: u32,
}

let foo = Foo { bar: 123 };

assert_eq!(foo.field_len(), 1);
assert_eq!(foo.name_at(0), Some("bar"));

let field: &dyn PartialReflect = foo.field("bar").unwrap();
assert_eq!(field.try_downcast_ref::<u32>(), Some(&123));

Required Methods§

Source

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field named name as a &dyn PartialReflect.

Source

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field named name as a &mut dyn PartialReflect.

Source

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field with index index as a &dyn PartialReflect.

Source

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field with index index as a &mut dyn PartialReflect.

Source

fn name_at(&self, index: usize) -> Option<&str>

Returns the name of the field with index index.

Source

fn field_len(&self) -> usize

Returns the number of fields in the struct.

Source

fn iter_fields(&self) -> FieldIter<'_>

Returns an iterator over the values of the reflectable fields for this struct.

Source

fn clone_dynamic(&self) -> DynamicStruct

Clones the struct into a DynamicStruct.

Provided Methods§

Source

fn get_represented_struct_info(&self) -> Option<&'static StructInfo>

Will return None if TypeInfo is not available.

Trait Implementations§

Source§

impl GetField for dyn Struct

Source§

fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>

Returns a reference to the value of the field named name, downcast to T.
Source§

fn get_field_mut<T: Reflect>(&mut self, name: &str) -> Option<&mut T>

Returns a mutable reference to the value of the field named name, downcast to T.

Implementations on Foreign Types§

Source§

impl Struct for BVec2
where BVec2: Any + Send + Sync, bool: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for BVec3
where BVec3: Any + Send + Sync, bool: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for BVec4
where BVec4: Any + Send + Sync, bool: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Affine2
where Affine2: Any + Send + Sync, Mat2: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Affine3A
where Affine3A: Any + Send + Sync, Mat3A: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec3A: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Mat3
where Mat3: Any + Send + Sync, Vec3: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Mat2
where Mat2: Any + Send + Sync, Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Mat3A
where Mat3A: Any + Send + Sync, Vec3A: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Mat4
where Mat4: Any + Send + Sync, Vec4: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Quat
where Quat: Any + Send + Sync, f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Vec3A
where Vec3A: Any + Send + Sync, f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Vec4
where Vec4: Any + Send + Sync, f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Vec2
where Vec2: Any + Send + Sync, f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for Vec3
where Vec3: Any + Send + Sync, f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DAffine2
where DAffine2: Any + Send + Sync, DMat2: FromReflect + TypePath + MaybeTyped + RegisterForReflection, DVec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DAffine3
where DAffine3: Any + Send + Sync, DMat3: FromReflect + TypePath + MaybeTyped + RegisterForReflection, DVec3: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DMat2
where DMat2: Any + Send + Sync, DVec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DMat3
where DMat3: Any + Send + Sync, DVec3: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DMat4
where DMat4: Any + Send + Sync, DVec4: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DQuat
where DQuat: Any + Send + Sync, f64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DVec2
where DVec2: Any + Send + Sync, f64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DVec3
where DVec3: Any + Send + Sync, f64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for DVec4
where DVec4: Any + Send + Sync, f64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for IVec2
where IVec2: Any + Send + Sync, i32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for IVec3
where IVec3: Any + Send + Sync, i32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for IVec4
where IVec4: Any + Send + Sync, i32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for I64Vec2
where I64Vec2: Any + Send + Sync, i64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for I64Vec3
where I64Vec3: Any + Send + Sync, i64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for I64Vec4
where I64Vec4: Any + Send + Sync, i64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for UVec2
where UVec2: Any + Send + Sync, u32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for UVec3
where UVec3: Any + Send + Sync, u32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for UVec4
where UVec4: Any + Send + Sync, u32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for U64Vec2
where U64Vec2: Any + Send + Sync, u64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for U64Vec3
where U64Vec3: Any + Send + Sync, u64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Source§

impl Struct for U64Vec4
where U64Vec4: Any + Send + Sync, u64: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Available on crate feature glam only.
Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Source§

fn name_at(&self, index: usize) -> Option<&str>

Source§

fn field_len(&self) -> usize

Source§

fn iter_fields(&self) -> FieldIter<'_>

Source§

fn clone_dynamic(&self) -> DynamicStruct

Implementors§