Struct sixtyfps_compilerlib::expression_tree::BindingExpression[][src]

pub struct BindingExpression {
    pub expression: Expression,
    pub span: Option<SourceLocation>,
    pub priority: i32,
    pub animation: Option<PropertyAnimation>,
    pub analysis: RefCell<Option<BindingAnalysis>>,
    pub two_way_bindings: Vec<NamedReference>,
}
Expand description

The expression in the Element::binding hash table

Fields

expression: Expressionspan: Option<SourceLocation>

The location of this expression in the source code

priority: i32

How deep is this binding declared in the hierarchy. When two binding are conflicting for the same priority (because of two way binding), the lower priority wins. The priority starts at 1, and each level of inlining adds one to the priority. 0 means the expression was added by some passes and it is not explicit in the source code

animation: Option<PropertyAnimation>analysis: RefCell<Option<BindingAnalysis>>

The analysis information. None before it is computed

two_way_bindings: Vec<NamedReference>

The properties this expression is aliased with using two way bindings

Implementations

Create an expression binding that simply is a two way binding to the other

Merge the other into this one. Normally, &self is kept intact (has priority) unless the expression is invalid, in which case the other one is taken.

Also the animation is taken if the other don’t have one, and the two ways binding are taken into account.

Returns true if the other expression was taken

returns false if there is no expression or two way binding

Methods from Deref<Target = Expression>

Return the type of this property

Call the visitor for each sub-expression. (note: this function does not recurse)

Visit itself and each sub expression recursively

Visit itself and each sub expression recursively

Try to mark this expression to a lvalue that can be assigned to.

Return true if the expression is a “lvalue” that can be used as the left hand side of a = or += or similar

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.