NumericValue

Trait NumericValue 

Source
pub trait NumericValue {
    // Required methods
    fn add_to_action_builder(
        self,
        builder: ActionBuilder,
        key: &str,
    ) -> ActionBuilder;
    fn subtract_from_action_builder(
        self,
        builder: ActionBuilder,
        key: &str,
    ) -> ActionBuilder;
}
Expand description

Trait for numeric values that can be added or subtracted in action effects. This trait is implemented for i32, i64, f32, and f64.

Required Methods§

Source

fn add_to_action_builder( self, builder: ActionBuilder, key: &str, ) -> ActionBuilder

Adds this numeric value to the specified state variable in the action builder.

Source

fn subtract_from_action_builder( self, builder: ActionBuilder, key: &str, ) -> ActionBuilder

Subtracts this numeric value from the specified state variable in the action builder.

Implementations on Foreign Types§

Source§

impl NumericValue for f32

Source§

impl NumericValue for f64

Source§

impl NumericValue for i32

Source§

impl NumericValue for i64

Implementors§