Struct pax_manifest::ComponentDefinition
source · pub struct ComponentDefinition {
pub type_id: TypeId,
pub is_main_component: bool,
pub is_primitive: bool,
pub is_struct_only_component: bool,
pub module_path: String,
pub primitive_instance_import_path: Option<String>,
pub template: Option<ComponentTemplate>,
pub settings: Option<Vec<SettingsBlockElement>>,
}
Expand description
Container for an entire component definition — includes template, settings, event bindings, property definitions, and compiler + reflection metadata
Fields§
§type_id: TypeId
§is_main_component: bool
§is_primitive: bool
§is_struct_only_component: bool
Flag describing whether this component definition is a “struct-only component”, a
struct decorated with #[pax]
for use as the T
in Property<T>
.
module_path: String
§primitive_instance_import_path: Option<String>
For primitives like Rectangle or Group, a separate import path is required for the Instance (render context) struct and the Definition struct. For primitives, then, we need to store an additional import path to use when instantiating.
template: Option<ComponentTemplate>
§settings: Option<Vec<SettingsBlockElement>>
Implementations§
source§impl ComponentDefinition
impl ComponentDefinition
pub fn get_property_definitions<'a>( &self, tt: &'a TypeTable ) -> &'a Vec<PropertyDefinition>
Trait Implementations§
source§impl Clone for ComponentDefinition
impl Clone for ComponentDefinition
source§fn clone(&self) -> ComponentDefinition
fn clone(&self) -> ComponentDefinition
Returns a copy 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<'de> Deserialize<'de> for ComponentDefinition
impl<'de> Deserialize<'de> for ComponentDefinition
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
Auto Trait Implementations§
impl Freeze for ComponentDefinition
impl RefUnwindSafe for ComponentDefinition
impl Send for ComponentDefinition
impl Sync for ComponentDefinition
impl Unpin for ComponentDefinition
impl UnwindSafe for ComponentDefinition
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
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.