Enum i_slint_compiler::langtype::ElementType
source · pub enum ElementType {
Component(Rc<Component>),
Builtin(Rc<BuiltinElement>),
Native(Rc<NativeClass>),
Error,
Global,
}
Expand description
The base of an element
Variants§
Component(Rc<Component>)
The element is based of a component
Builtin(Rc<BuiltinElement>)
The element is a builtin element
Native(Rc<NativeClass>)
The native type was resolved by the resolve_native_class pass.
Error
The base element couldn’t be looked up
Global
This should be the base type of the root element of a global component
Implementations§
source§impl ElementType
impl ElementType
pub fn lookup_property<'a>(&self, name: &'a str) -> PropertyLookupResult<'a>
sourcepub fn property_list(&self) -> Vec<(String, Type)>
pub fn property_list(&self) -> Vec<(String, Type)>
List of sub properties valid for the auto completion
pub fn lookup_type_for_child_element( &self, name: &str, tr: &TypeRegister ) -> Result<ElementType, String>
pub fn lookup_member_function(&self, name: &str) -> Option<BuiltinFunction>
pub fn collect_contextual_types( &self, context_restricted_types: &mut HashMap<String, HashSet<String>> )
sourcepub fn as_builtin(&self) -> &BuiltinElement
pub fn as_builtin(&self) -> &BuiltinElement
Assume this is a builtin type, panic if it isn’t
sourcepub fn as_native(&self) -> &NativeClass
pub fn as_native(&self) -> &NativeClass
Assume this is a builtin type, panic if it isn’t
sourcepub fn as_component(&self) -> &Rc<Component>
pub fn as_component(&self) -> &Rc<Component>
Assume it is a Component, panic if it isn’t
Trait Implementations§
source§impl Clone for ElementType
impl Clone for ElementType
source§fn clone(&self) -> ElementType
fn clone(&self) -> ElementType
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 Debug for ElementType
impl Debug for ElementType
source§impl Default for ElementType
impl Default for ElementType
source§impl Display for ElementType
impl Display for ElementType
Auto Trait Implementations§
impl !RefUnwindSafe for ElementType
impl !Send for ElementType
impl !Sync for ElementType
impl Unpin for ElementType
impl !UnwindSafe for ElementType
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