pub enum CalcValue {
Visibility {
target: ElementTarget,
},
Display {
target: ElementTarget,
},
Id {
target: ElementTarget,
},
DataAttrValue {
attr: String,
target: ElementTarget,
},
EventValue,
WidthPx {
target: ElementTarget,
},
HeightPx {
target: ElementTarget,
},
PositionX {
target: ElementTarget,
},
PositionY {
target: ElementTarget,
},
MouseX {
target: Option<ElementTarget>,
},
MouseY {
target: Option<ElementTarget>,
},
Key {
key: Key,
},
}Expand description
Computed value from element or event state
Represents a value that is calculated at runtime based on element properties, mouse position, or event data. These values are used in conditional logic and parameterized actions.
Variants§
Visibility
Get visibility state of an element
Fields
target: ElementTargetTarget element
Display
Get display state of an element
Fields
target: ElementTargetTarget element
Id
Get element ID of an element
Fields
target: ElementTargetTarget element
DataAttrValue
Get data attribute value from an element
EventValue
Get current event value (e.g., input field value)
WidthPx
Get width in pixels of an element
Fields
target: ElementTargetTarget element
HeightPx
Get height in pixels of an element
Fields
target: ElementTargetTarget element
PositionX
Get X position of an element
Fields
target: ElementTargetTarget element
PositionY
Get Y position of an element
Fields
target: ElementTargetTarget element
MouseX
Get mouse X coordinate (optionally relative to element)
Fields
target: Option<ElementTarget>Optional target element for relative coordinates
MouseY
Get mouse Y coordinate (optionally relative to element)
Fields
target: Option<ElementTarget>Optional target element for relative coordinates
Key
Get keyboard key value
Implementations§
Source§impl CalcValue
impl CalcValue
Sourcepub fn eq(self, other: impl Into<Value>) -> Condition
pub fn eq(self, other: impl Into<Value>) -> Condition
Creates an equality condition comparing this value to another
Sourcepub fn plus(self, other: impl Into<Value>) -> Arithmetic
pub fn plus(self, other: impl Into<Value>) -> Arithmetic
Adds another value to this value
Sourcepub fn minus(self, other: impl Into<Value>) -> Arithmetic
pub fn minus(self, other: impl Into<Value>) -> Arithmetic
Subtracts another value from this value
Sourcepub fn multiply(self, other: impl Into<Value>) -> Arithmetic
pub fn multiply(self, other: impl Into<Value>) -> Arithmetic
Multiplies this value by another value
Sourcepub fn divide(self, other: impl Into<Value>) -> Arithmetic
pub fn divide(self, other: impl Into<Value>) -> Arithmetic
Divides this value by another value
Sourcepub fn min(self, other: impl Into<Value>) -> Arithmetic
pub fn min(self, other: impl Into<Value>) -> Arithmetic
Returns the minimum of this value and another
Sourcepub fn max(self, other: impl Into<Value>) -> Arithmetic
pub fn max(self, other: impl Into<Value>) -> Arithmetic
Returns the maximum of this value and another
Sourcepub fn clamp(self, min: impl Into<Value>, max: impl Into<Value>) -> Arithmetic
pub fn clamp(self, min: impl Into<Value>, max: impl Into<Value>) -> Arithmetic
Clamps this value between min and max bounds
Sourcepub fn then_pass_to(self, other: impl Into<ActionType>) -> ActionType
pub fn then_pass_to(self, other: impl Into<ActionType>) -> ActionType
Creates a parameterized action that passes this value to the action
Trait Implementations§
Source§impl Arbitrary for CalcValue
Available on crate feature logic only.
impl Arbitrary for CalcValue
logic only.Source§fn arbitrary_with((): Self::Parameters) -> Self::Strategy
fn arbitrary_with((): Self::Parameters) -> Self::Strategy
Generates an arbitrary CalcValue for property-based testing
Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.