Enum sixtyfps_compilerlib::langtype::Type [−][src]
pub enum Type {}Show variants
Invalid, Void, Component(Rc<Component>), Builtin(Rc<BuiltinElement>), Native(Rc<NativeClass>), Callback { return_type: Option<Box<Type>>, args: Vec<Type>, }, Function { return_type: Box<Type>, args: Vec<Type>, }, Float32, Int32, String, Color, Duration, PhysicalLength, LogicalLength, Angle, Percent, Image, Bool, Model, PathElements, Easing, Brush, Array(Box<Type>), Struct { fields: BTreeMap<String, Type>, name: Option<String>, node: Option<ObjectType>, }, Enumeration(Rc<Enumeration>), UnitProduct(Vec<(Unit, i8)>), ElementReference,
Variants
Correspond to an uninitialized type, or an error
The type of an expression that return nothing
Builtin(Rc<BuiltinElement>)
Native(Rc<NativeClass>)
Show fields
Enumeration(Rc<Enumeration>)
A type made up of the product of several “unit” types. The first parameter is the unit, and the second parameter is the power. The vector should be sorted by 1) the power, 2) the unit.
Implementations
impl Type
[src]
impl Type
[src]pub fn is_object_type(&self) -> bool
[src]
pub fn is_property_type(&self) -> bool
[src]
valid type for properties
pub fn ok_for_public_api(&self) -> bool
[src]
pub fn lookup_property<'a>(&self, name: &'a str) -> PropertyLookupResult<'a>
[src]
pub fn property_list(&self) -> Vec<(String, Type)>ⓘ
[src]
List of sub properties valid for the auto completion
pub fn lookup_type_for_child_element(
&self,
name: &str,
tr: &TypeRegister
) -> Result<Type, String>
[src]
&self,
name: &str,
tr: &TypeRegister
) -> Result<Type, String>
pub fn lookup_member_function(&self, name: &str) -> Expression
[src]
pub fn as_builtin(&self) -> &BuiltinElement
[src]
Assume this is a builtin type, panic if it isn’t
pub fn as_native(&self) -> &NativeClass
[src]
Assume this is a builtin type, panic if it isn’t
pub fn as_component(&self) -> &Rc<Component>
[src]
Assime it is a Component, panic if it isn’t
pub fn as_enum(&self) -> &Rc<Enumeration>
[src]
Assume it is an enumeration, panic if it isn’t
pub fn can_convert(&self, other: &Self) -> bool
[src]
Return true if the type can be converted to the other type
pub fn collect_contextual_types(
&self,
context_restricted_types: &mut HashMap<String, HashSet<String>>
)
[src]
&self,
context_restricted_types: &mut HashMap<String, HashSet<String>>
)
pub fn default_unit(&self) -> Option<Unit>
[src]
If this is a number type which should be used with an unit, this returns the default unit otherwise, returns None
pub fn as_unit_product(&self) -> Option<Vec<(Unit, i8)>>
[src]
Return a unit product vector even for single scalar
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Type
impl !RefUnwindSafe for Type
impl !UnwindSafe for Type
impl !UnwindSafe for Type