[−][src]Struct sixtyfps_compilerlib::object_tree::Element
An Element is an instentation of a Component
Fields
id: String
The id as named in the original .60 file.
Note that it can only be used for lookup before inlining. After inlining there can be duplicated id in the component. The id are then re-assigned unique id in the assign_id pass
base_type: Type
bindings: HashMap<String, ExpressionSpanned>
Currently contains also the signals. FIXME: should that be changed?
children: Vec<ElementRc>
enclosing_component: Weak<Component>
The component which contains this element.
property_declarations: HashMap<String, PropertyDeclaration>
property_animations: HashMap<String, PropertyAnimation>
repeated: Option<RepeatedElementInfo>
Tis element is part of a `for
states: Vec<State>
transitions: Vec<Transition>
child_of_layout: bool
true when this item's geometry is handled by a layout
item_index: OnceCell<usize>
This is the component-local index of this item in the item tree array. It is generated after the last pass and before the generators run.
node: Option<Element>
The AST node, if available
Implementations
impl Element
[src]
pub fn from_node(
node: Element,
id: String,
parent_type: Type,
component_child_insertion_point: &mut Option<ElementRc>,
diag: &mut FileDiagnostics,
tr: &TypeRegister
) -> ElementRc
[src]
node: Element,
id: String,
parent_type: Type,
component_child_insertion_point: &mut Option<ElementRc>,
diag: &mut FileDiagnostics,
tr: &TypeRegister
) -> ElementRc
pub fn lookup_property(&self, name: &str) -> Type
[src]
Return the type of a property in this element or its base
pub fn span(&self) -> Span
[src]
Return the Span of this element in the AST for error reporting
pub fn native_class(&self) -> Option<Rc<NativeClass>>
[src]
Trait Implementations
impl Debug for Element
[src]
impl Default for Element
[src]
impl Spanned for Element
[src]
impl SpannedWithSourceFile for Element
[src]
pub fn source_file(&self) -> Option<&Rc<PathBuf>>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Element
[src]
impl !Send for Element
[src]
impl !Sync for Element
[src]
impl Unpin for Element
[src]
impl !UnwindSafe for Element
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,