Skip to main content

Property

Enum Property 

Source
pub enum Property<T> {
    Static(T),
    RandomRange(PropRange<T>),
    RandomChoice(Vec<T>),
    Random,
}
Expand description

Generic property that can be static, randomized within a range, randomly selected from a predetermined list, or entirely random on each read.

Implementation of Default provides Static(T::default())

Variants§

§

Static(T)

Produces the same value

§

RandomRange(PropRange<T>)

Produces a random value within the given range

§

RandomChoice(Vec<T>)

Produces a randomly selected value from the given list

§

Random

Produces a completely random value

Trait Implementations§

Source§

impl<T: Clone> Clone for Property<T>

Source§

fn clone(&self) -> Property<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Default> Default for Property<T>

Provides Static(T::default())

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> Enum for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

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

Returns a reference to the value of the field (in the current variant) with the given name. Read more
Source§

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

Returns a reference to the value of the field (in the current variant) at the given index.
Source§

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

Returns a mutable reference to the value of the field (in the current variant) with the given name. Read more
Source§

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

Returns a mutable reference to the value of the field (in the current variant) at the given index.
Source§

fn index_of(&self, __name_param: &str) -> Option<usize>

Returns the index of the field (in the current variant) with the given name. Read more
Source§

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

Returns the name of the field (in the current variant) with the given index. Read more
Source§

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

Returns an iterator over the values of the current variant’s fields.
Source§

fn field_len(&self) -> usize

Returns the number of fields in the current variant.
Source§

fn variant_name(&self) -> &str

The name of the current variant.
Source§

fn variant_index(&self) -> usize

The index of the current variant.
Source§

fn variant_type(&self) -> VariantType

The type of the current variant.
Source§

fn to_dynamic_enum(&self) -> DynamicEnum

Creates a new DynamicEnum from this enum.
Source§

fn is_variant(&self, variant_type: VariantType) -> bool

Returns true if the current variant’s type matches the given one.
Source§

fn variant_path(&self) -> String

Returns the full path to the current variant.
Source§

fn get_represented_enum_info(&self) -> Option<&'static EnumInfo>

Will return None if TypeInfo is not available.
Source§

impl<T: Clone, const N: usize> From<&[[T; N]]> for Property<[T; N]>

Source§

fn from(v: &[[T; N]]) -> Self

Converts to this type from the input type.
Source§

impl From<&[DVec2]> for Property<DVec2>

Source§

fn from(v: &[DVec2]) -> Self

Converts to this type from the input type.
Source§

impl From<&[DVec3]> for Property<DVec3>

Source§

fn from(v: &[DVec3]) -> Self

Converts to this type from the input type.
Source§

impl From<&[DVec4]> for Property<DVec4>

Source§

fn from(v: &[DVec4]) -> Self

Converts to this type from the input type.
Source§

impl From<&[IVec2]> for Property<IVec2>

Source§

fn from(v: &[IVec2]) -> Self

Converts to this type from the input type.
Source§

impl From<&[IVec3]> for Property<IVec3>

Source§

fn from(v: &[IVec3]) -> Self

Converts to this type from the input type.
Source§

impl From<&[IVec4]> for Property<IVec4>

Source§

fn from(v: &[IVec4]) -> Self

Converts to this type from the input type.
Source§

impl From<&[UVec2]> for Property<UVec2>

Source§

fn from(v: &[UVec2]) -> Self

Converts to this type from the input type.
Source§

impl From<&[UVec3]> for Property<UVec3>

Source§

fn from(v: &[UVec3]) -> Self

Converts to this type from the input type.
Source§

impl From<&[UVec4]> for Property<UVec4>

Source§

fn from(v: &[UVec4]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Vec2]> for Property<Vec2>

Source§

fn from(v: &[Vec2]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Vec3]> for Property<Vec3>

Source§

fn from(v: &[Vec3]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Vec4]> for Property<Vec4>

Source§

fn from(v: &[Vec4]) -> Self

Converts to this type from the input type.
Source§

impl From<&[f32]> for Property<f32>

Source§

fn from(v: &[f32]) -> Self

Converts to this type from the input type.
Source§

impl From<&[f64]> for Property<f64>

Source§

fn from(v: &[f64]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i128]> for Property<i128>

Source§

fn from(v: &[i128]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i16]> for Property<i16>

Source§

fn from(v: &[i16]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i32]> for Property<i32>

Source§

fn from(v: &[i32]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i64]> for Property<i64>

Source§

fn from(v: &[i64]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i8]> for Property<i8>

Source§

fn from(v: &[i8]) -> Self

Converts to this type from the input type.
Source§

impl From<&[isize]> for Property<isize>

Source§

fn from(v: &[isize]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u128]> for Property<u128>

Source§

fn from(v: &[u128]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u16]> for Property<u16>

Source§

fn from(v: &[u16]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u32]> for Property<u32>

Source§

fn from(v: &[u32]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u64]> for Property<u64>

Source§

fn from(v: &[u64]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u8]> for Property<u8>

Source§

fn from(v: &[u8]) -> Self

Converts to this type from the input type.
Source§

impl From<&[usize]> for Property<usize>

Source§

fn from(v: &[usize]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize, const M: usize> From<[[T; N]; M]> for Property<[T; N]>

Source§

fn from(v: [[T; N]; M]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[DVec2; N]> for Property<DVec2>

Source§

fn from(v: [DVec2; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[DVec3; N]> for Property<DVec3>

Source§

fn from(v: [DVec3; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[DVec4; N]> for Property<DVec4>

Source§

fn from(v: [DVec4; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[IVec2; N]> for Property<IVec2>

Source§

fn from(v: [IVec2; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[IVec3; N]> for Property<IVec3>

Source§

fn from(v: [IVec3; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[IVec4; N]> for Property<IVec4>

Source§

fn from(v: [IVec4; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[UVec2; N]> for Property<UVec2>

Source§

fn from(v: [UVec2; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[UVec3; N]> for Property<UVec3>

Source§

fn from(v: [UVec3; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[UVec4; N]> for Property<UVec4>

Source§

fn from(v: [UVec4; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Vec2; N]> for Property<Vec2>

Source§

fn from(v: [Vec2; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Vec3; N]> for Property<Vec3>

Source§

fn from(v: [Vec3; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Vec4; N]> for Property<Vec4>

Source§

fn from(v: [Vec4; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[f32; N]> for Property<f32>

Source§

fn from(v: [f32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[f64; N]> for Property<f64>

Source§

fn from(v: [f64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i128; N]> for Property<i128>

Source§

fn from(v: [i128; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i16; N]> for Property<i16>

Source§

fn from(v: [i16; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i32; N]> for Property<i32>

Source§

fn from(v: [i32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i64; N]> for Property<i64>

Source§

fn from(v: [i64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i8; N]> for Property<i8>

Source§

fn from(v: [i8; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[isize; N]> for Property<isize>

Source§

fn from(v: [isize; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u128; N]> for Property<u128>

Source§

fn from(v: [u128; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u16; N]> for Property<u16>

Source§

fn from(v: [u16; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u32; N]> for Property<u32>

Source§

fn from(v: [u32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u64; N]> for Property<u64>

Source§

fn from(v: [u64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u8; N]> for Property<u8>

Source§

fn from(v: [u8; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[usize; N]> for Property<usize>

Source§

fn from(v: [usize; N]) -> Self

Converts to this type from the input type.
Source§

impl From<DVec2> for Property<DVec2>

Source§

fn from(v: DVec2) -> Self

Converts to this type from the input type.
Source§

impl From<DVec3> for Property<DVec3>

Source§

fn from(v: DVec3) -> Self

Converts to this type from the input type.
Source§

impl From<DVec4> for Property<DVec4>

Source§

fn from(v: DVec4) -> Self

Converts to this type from the input type.
Source§

impl From<IVec2> for Property<IVec2>

Source§

fn from(v: IVec2) -> Self

Converts to this type from the input type.
Source§

impl From<IVec3> for Property<IVec3>

Source§

fn from(v: IVec3) -> Self

Converts to this type from the input type.
Source§

impl From<IVec4> for Property<IVec4>

Source§

fn from(v: IVec4) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<Range<[T; N]>> for Property<[T; N]>

Source§

fn from(v: Range<[T; N]>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<DVec2>> for Property<DVec2>

Source§

fn from(v: Range<DVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<DVec3>> for Property<DVec3>

Source§

fn from(v: Range<DVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<DVec4>> for Property<DVec4>

Source§

fn from(v: Range<DVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<IVec2>> for Property<IVec2>

Source§

fn from(v: Range<IVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<IVec3>> for Property<IVec3>

Source§

fn from(v: Range<IVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<IVec4>> for Property<IVec4>

Source§

fn from(v: Range<IVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<UVec2>> for Property<UVec2>

Source§

fn from(v: Range<UVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<UVec3>> for Property<UVec3>

Source§

fn from(v: Range<UVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<UVec4>> for Property<UVec4>

Source§

fn from(v: Range<UVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<Vec2>> for Property<Vec2>

Source§

fn from(v: Range<Vec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<Vec3>> for Property<Vec3>

Source§

fn from(v: Range<Vec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<Vec4>> for Property<Vec4>

Source§

fn from(v: Range<Vec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<f32>> for Property<f32>

Source§

fn from(v: Range<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<f64>> for Property<f64>

Source§

fn from(v: Range<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<i128>> for Property<i128>

Source§

fn from(v: Range<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<i16>> for Property<i16>

Source§

fn from(v: Range<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<i32>> for Property<i32>

Source§

fn from(v: Range<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<i64>> for Property<i64>

Source§

fn from(v: Range<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<i8>> for Property<i8>

Source§

fn from(v: Range<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<isize>> for Property<isize>

Source§

fn from(v: Range<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<u128>> for Property<u128>

Source§

fn from(v: Range<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<u16>> for Property<u16>

Source§

fn from(v: Range<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<u32>> for Property<u32>

Source§

fn from(v: Range<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<u64>> for Property<u64>

Source§

fn from(v: Range<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<u8>> for Property<u8>

Source§

fn from(v: Range<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<Range<usize>> for Property<usize>

Source§

fn from(v: Range<usize>) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone, const N: usize> From<RangeInclusive<[T; N]>> for Property<[T; N]>

Source§

fn from(v: RangeInclusive<[T; N]>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<DVec2>> for Property<DVec2>

Source§

fn from(v: RangeInclusive<DVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<DVec3>> for Property<DVec3>

Source§

fn from(v: RangeInclusive<DVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<DVec4>> for Property<DVec4>

Source§

fn from(v: RangeInclusive<DVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<IVec2>> for Property<IVec2>

Source§

fn from(v: RangeInclusive<IVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<IVec3>> for Property<IVec3>

Source§

fn from(v: RangeInclusive<IVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<IVec4>> for Property<IVec4>

Source§

fn from(v: RangeInclusive<IVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<UVec2>> for Property<UVec2>

Source§

fn from(v: RangeInclusive<UVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<UVec3>> for Property<UVec3>

Source§

fn from(v: RangeInclusive<UVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<UVec4>> for Property<UVec4>

Source§

fn from(v: RangeInclusive<UVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<Vec2>> for Property<Vec2>

Source§

fn from(v: RangeInclusive<Vec2>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<Vec3>> for Property<Vec3>

Source§

fn from(v: RangeInclusive<Vec3>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<Vec4>> for Property<Vec4>

Source§

fn from(v: RangeInclusive<Vec4>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<f32>> for Property<f32>

Source§

fn from(v: RangeInclusive<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<f64>> for Property<f64>

Source§

fn from(v: RangeInclusive<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<i128>> for Property<i128>

Source§

fn from(v: RangeInclusive<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<i16>> for Property<i16>

Source§

fn from(v: RangeInclusive<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<i32>> for Property<i32>

Source§

fn from(v: RangeInclusive<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<i64>> for Property<i64>

Source§

fn from(v: RangeInclusive<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<i8>> for Property<i8>

Source§

fn from(v: RangeInclusive<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<isize>> for Property<isize>

Source§

fn from(v: RangeInclusive<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<u128>> for Property<u128>

Source§

fn from(v: RangeInclusive<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<u16>> for Property<u16>

Source§

fn from(v: RangeInclusive<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<u32>> for Property<u32>

Source§

fn from(v: RangeInclusive<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<u64>> for Property<u64>

Source§

fn from(v: RangeInclusive<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<u8>> for Property<u8>

Source§

fn from(v: RangeInclusive<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<RangeInclusive<usize>> for Property<usize>

Source§

fn from(v: RangeInclusive<usize>) -> Self

Converts to this type from the input type.
Source§

impl From<UVec2> for Property<UVec2>

Source§

fn from(v: UVec2) -> Self

Converts to this type from the input type.
Source§

impl From<UVec3> for Property<UVec3>

Source§

fn from(v: UVec3) -> Self

Converts to this type from the input type.
Source§

impl From<UVec4> for Property<UVec4>

Source§

fn from(v: UVec4) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<Vec<[T; N]>> for Property<[T; N]>

Source§

fn from(v: Vec<[T; N]>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<DVec2>> for Property<DVec2>

Source§

fn from(v: Vec<DVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<DVec3>> for Property<DVec3>

Source§

fn from(v: Vec<DVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<DVec4>> for Property<DVec4>

Source§

fn from(v: Vec<DVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<IVec2>> for Property<IVec2>

Source§

fn from(v: Vec<IVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<IVec3>> for Property<IVec3>

Source§

fn from(v: Vec<IVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<IVec4>> for Property<IVec4>

Source§

fn from(v: Vec<IVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<UVec2>> for Property<UVec2>

Source§

fn from(v: Vec<UVec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<UVec3>> for Property<UVec3>

Source§

fn from(v: Vec<UVec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<UVec4>> for Property<UVec4>

Source§

fn from(v: Vec<UVec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Vec2>> for Property<Vec2>

Source§

fn from(v: Vec<Vec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Vec3>> for Property<Vec3>

Source§

fn from(v: Vec<Vec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Vec4>> for Property<Vec4>

Source§

fn from(v: Vec<Vec4>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<f32>> for Property<f32>

Source§

fn from(v: Vec<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<f64>> for Property<f64>

Source§

fn from(v: Vec<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i128>> for Property<i128>

Source§

fn from(v: Vec<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i16>> for Property<i16>

Source§

fn from(v: Vec<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i32>> for Property<i32>

Source§

fn from(v: Vec<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i64>> for Property<i64>

Source§

fn from(v: Vec<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i8>> for Property<i8>

Source§

fn from(v: Vec<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<isize>> for Property<isize>

Source§

fn from(v: Vec<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u128>> for Property<u128>

Source§

fn from(v: Vec<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u16>> for Property<u16>

Source§

fn from(v: Vec<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u32>> for Property<u32>

Source§

fn from(v: Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u64>> for Property<u64>

Source§

fn from(v: Vec<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for Property<u8>

Source§

fn from(v: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<usize>> for Property<usize>

Source§

fn from(v: Vec<usize>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec2> for Property<Vec2>

Source§

fn from(v: Vec2) -> Self

Converts to this type from the input type.
Source§

impl From<Vec3> for Property<Vec3>

Source§

fn from(v: Vec3) -> Self

Converts to this type from the input type.
Source§

impl From<Vec4> for Property<Vec4>

Source§

fn from(v: Vec4) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Property<f32>

Source§

fn from(v: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Property<f64>

Source§

fn from(v: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for Property<i128>

Source§

fn from(v: i128) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Property<i16>

Source§

fn from(v: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Property<i32>

Source§

fn from(v: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Property<i64>

Source§

fn from(v: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Property<i8>

Source§

fn from(v: i8) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for Property<isize>

Source§

fn from(v: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for Property<u128>

Source§

fn from(v: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Property<u16>

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Property<u32>

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Property<u64>

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Property<u8>

Source§

fn from(v: u8) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for Property<usize>

Source§

fn from(v: usize) -> Self

Converts to this type from the input type.
Source§

impl<T> FromReflect for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn from_reflect(__param0: &dyn PartialReflect) -> Option<Self>

Constructs a concrete instance of Self from a reflected value.
Source§

fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
Source§

impl<T> GetTypeRegistration for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
Source§

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
Source§

impl<T> PartialReflect for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
Source§

fn try_apply( &mut self, __value_param: &dyn PartialReflect, ) -> Result<(), ApplyError>

Tries to apply a reflected value to this value. Read more
Source§

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type. Read more
Source§

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

Returns an immutable enumeration of “kinds” of type. Read more
Source§

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

Returns a mutable enumeration of “kinds” of type. Read more
Source§

fn reflect_owned(self: Box<Self>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
Source§

fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.
Source§

fn try_as_reflect(&self) -> Option<&dyn Reflect>

Attempts to cast this type to a fully-reflected value.
Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>

Attempts to cast this type to a mutable, fully-reflected value.
Source§

fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value. Read more
Source§

fn as_partial_reflect(&self) -> &dyn PartialReflect

Casts this type to a reflected value. Read more
Source§

fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect

Casts this type to a mutable, reflected value. Read more
Source§

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

Returns a hash of the value (which includes the type). Read more
Source§

fn reflect_partial_eq(&self, value: &dyn PartialReflect) -> Option<bool>

Returns a “partial equality” comparison result. Read more
Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection. Read more
Source§

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

Applies a reflected value to this value. Read more
Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Converts this reflected value into its dynamic representation based on its kind. Read more
Source§

fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
where T: 'static, Self: Sized + TypePath,

For a type implementing PartialReflect, combines reflect_clone and take in a useful fashion, automatically constructing an appropriate ReflectCloneError if the downcast fails. Read more
Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Debug formatter for the value. Read more
Source§

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
Source§

impl<T> Reflect for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn into_any(self: Box<Self>) -> Box<dyn Any>

Returns the value as a Box<dyn Any>. Read more
Source§

fn as_any(&self) -> &dyn Any

Returns the value as a &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Returns the value as a &mut dyn Any. Read more
Source§

fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>

Casts this type to a boxed, fully-reflected value.
Source§

fn as_reflect(&self) -> &dyn Reflect

Casts this type to a fully-reflected value.
Source§

fn as_reflect_mut(&mut self) -> &mut dyn Reflect

Casts this type to a mutable, fully-reflected value.
Source§

fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>>

Performs a type-checked assignment of a reflected value to this value. Read more
Source§

impl<T> TypePath for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath,

Source§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Source§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Source§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Source§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Source§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
Source§

impl<T> Typed for Property<T>
where Property<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, PropRange<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
Source§

impl<T> VariableProperty for Property<T>
where T: PropRand + Clone + TypePath,

Source§

fn get_value(&self) -> T

Gets a value based on the parameters of the Property See Property for more information.

Source§

type Output = T

Auto Trait Implementations§

§

impl<T> Freeze for Property<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Property<T>
where T: RefUnwindSafe,

§

impl<T> Send for Property<T>
where T: Send,

§

impl<T> Sync for Property<T>
where T: Sync,

§

impl<T> Unpin for Property<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Property<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Property<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

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

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynamicTypePath for T
where T: TypePath,

Source§

impl<T> DynamicTyped for T
where T: Typed,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromWorld for T
where T: Default,

Source§

fn from_world(_world: &mut World) -> T

Creates Self using default().

Source§

impl<T> GetPath for T
where T: Reflect + ?Sized,

Source§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
Source§

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
Source§

fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
Source§

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoResult<T> for T

Source§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Source§

impl<A> Is for A
where A: Any,

Source§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of this value.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ConditionalSend for T
where T: Send,

Source§

impl<T> Reflectable for T