pub struct ComponentPropertyDefinition {
pub type: ComponentPropertyType,
pub default_value: Box<ComponentPropertyDefinitionDefaultValue>,
pub variant_options: Option<Vec<String>>,
pub preferred_values: Option<Vec<InstanceSwapPreferredValue>>,
}
Expand description
ComponentPropertyDefinition : A property of a component.
Fields§
§type: ComponentPropertyType
Type of this component property.
default_value: Box<ComponentPropertyDefinitionDefaultValue>
§variant_options: Option<Vec<String>>
All possible values for this property. Only exists on VARIANT properties.
preferred_values: Option<Vec<InstanceSwapPreferredValue>>
Preferred values for this property. Only applicable if type is INSTANCE_SWAP
.
Implementations§
Source§impl ComponentPropertyDefinition
impl ComponentPropertyDefinition
Sourcepub fn new(
type: ComponentPropertyType,
default_value: ComponentPropertyDefinitionDefaultValue,
) -> ComponentPropertyDefinition
pub fn new( type: ComponentPropertyType, default_value: ComponentPropertyDefinitionDefaultValue, ) -> ComponentPropertyDefinition
A property of a component.
Trait Implementations§
Source§impl Clone for ComponentPropertyDefinition
impl Clone for ComponentPropertyDefinition
Source§fn clone(&self) -> ComponentPropertyDefinition
fn clone(&self) -> ComponentPropertyDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentPropertyDefinition
impl Debug for ComponentPropertyDefinition
Source§impl Default for ComponentPropertyDefinition
impl Default for ComponentPropertyDefinition
Source§fn default() -> ComponentPropertyDefinition
fn default() -> ComponentPropertyDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ComponentPropertyDefinition
impl<'de> Deserialize<'de> for ComponentPropertyDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ComponentPropertyDefinition
Auto Trait Implementations§
impl Freeze for ComponentPropertyDefinition
impl RefUnwindSafe for ComponentPropertyDefinition
impl Send for ComponentPropertyDefinition
impl Sync for ComponentPropertyDefinition
impl Unpin for ComponentPropertyDefinition
impl UnwindSafe for ComponentPropertyDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more