pub struct FieldInfo<'a> {
    pub owner_type_id: TypeId,
    pub name: &'static str,
    pub display_name: &'static str,
    pub description: &'static str,
    pub type_name: &'static str,
    pub value: &'a dyn FieldValue,
    pub read_only: bool,
    pub min_value: Option<f64>,
    pub max_value: Option<f64>,
    pub step: Option<f64>,
    pub precision: Option<usize>,
}

Fields§

§owner_type_id: TypeId

A type id of the owner of the property.

§name: &'static str

A name of the property.

§display_name: &'static str

A human-readable name of the property.

§description: &'static str

Description of the property.

§type_name: &'static str

Type name of the property.

§value: &'a dyn FieldValue

An reference to the actual value of the property. This is “non-mangled” reference, which means that while field/fields/field_mut/fields_mut might return a reference to other value, than the actual field, the value is guaranteed to be a reference to the real value.

§read_only: bool

A property is not meant to be edited.

§min_value: Option<f64>

A minimal value of the property. Works only with numeric properties!

§max_value: Option<f64>

A minimal value of the property. Works only with numeric properties!

§step: Option<f64>

A minimal value of the property. Works only with numeric properties!

§precision: Option<usize>

Maximum amount of decimal places for a numeric property.

Implementations§

Tries to cast a value to a given type.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts self to a &dyn Any

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.