pub trait RotationBackend {
type Bool: Copy;
type Int: Copy;
type Float: Copy;
Show 56 methods
// Required methods
fn const_bool(&mut self, v: bool) -> Self::Bool;
fn const_i32(&mut self, v: i32) -> Self::Int;
fn const_i64(&mut self, v: i64) -> Self::Int;
fn const_f64(&mut self, v: f64) -> Self::Float;
fn load_bool(&mut self, offset: usize) -> Self::Bool;
fn load_i32(&mut self, offset: usize) -> Self::Int;
fn load_i64(&mut self, offset: usize) -> Self::Int;
fn load_f64(&mut self, offset: usize) -> Self::Float;
fn store_bool(&mut self, offset: usize, v: Self::Bool);
fn store_i32(&mut self, offset: usize, v: Self::Int);
fn store_f64(&mut self, offset: usize, v: Self::Float);
fn now(&mut self) -> Self::Float;
fn add_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn sub_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn mul_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn safe_div_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn min_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn max_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float;
fn floor_f(&mut self, v: Self::Float) -> Self::Float;
fn ceil_f(&mut self, v: Self::Float) -> Self::Float;
fn abs_f(&mut self, v: Self::Float) -> Self::Float;
fn cmp_gt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_gte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_lt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_lte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool;
fn cmp_eq_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn cmp_ne_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn cmp_gt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn cmp_gte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn cmp_lt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn cmp_lte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool;
fn and_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool;
fn or_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool;
fn not_b(&mut self, a: Self::Bool) -> Self::Bool;
fn bool_to_float(&mut self, v: Self::Bool) -> Self::Float;
fn bool_to_int(&mut self, v: Self::Bool) -> Self::Int;
fn int_to_float(&mut self, v: Self::Int) -> Self::Float;
fn int_to_bool(&mut self, v: Self::Int) -> Self::Bool;
fn float_to_bool(&mut self, v: Self::Float) -> Self::Bool;
fn float_to_int(&mut self, v: Self::Float) -> Self::Int;
fn select_f(
&mut self,
cond: Self::Bool,
t: Self::Float,
f: Self::Float,
) -> Self::Float;
fn select_i(
&mut self,
cond: Self::Bool,
t: Self::Int,
f: Self::Int,
) -> Self::Int;
fn select_b(
&mut self,
cond: Self::Bool,
t: Self::Bool,
f: Self::Bool,
) -> Self::Bool;
fn return_none_if(&mut self, cond: Self::Bool);
fn return_cast_if(
&mut self,
cond: Self::Bool,
spell_id: u32,
empower_rank: u8,
);
fn return_wait_if(&mut self, cond: Self::Bool, seconds: f32);
fn return_pool_if(&mut self, cond: Self::Bool, target: f32);
fn return_use_item_if(
&mut self,
cond: Self::Bool,
gear_slot: u8,
empower_rank: u8,
);
fn return_none(&mut self);
// Provided methods
fn record_action(&mut self, _record: ActionRecord<'_>) { ... }
fn record_action_guarded(
&mut self,
_list_id: &str,
_action_index: usize,
_action: &RotationAction,
_is_terminator: bool,
_guard_held: Self::Bool,
_failing: &Condition,
) { ... }
fn begin_list_recording(&mut self, _list_id: &str) { ... }
fn end_list_recording(&mut self) { ... }
}Expand description
Lowering trait of primitive ops both rotation backends must support, with bit-identical numeric semantics.
Required Associated Types§
Required Methods§
fn const_bool(&mut self, v: bool) -> Self::Bool
fn const_i32(&mut self, v: i32) -> Self::Int
fn const_i64(&mut self, v: i64) -> Self::Int
fn const_f64(&mut self, v: f64) -> Self::Float
fn load_bool(&mut self, offset: usize) -> Self::Bool
fn load_i32(&mut self, offset: usize) -> Self::Int
fn load_i64(&mut self, offset: usize) -> Self::Int
fn load_f64(&mut self, offset: usize) -> Self::Float
fn store_bool(&mut self, offset: usize, v: Self::Bool)
fn store_i32(&mut self, offset: usize, v: Self::Int)
fn store_f64(&mut self, offset: usize, v: Self::Float)
fn now(&mut self) -> Self::Float
fn add_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn sub_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn mul_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Sourcefn safe_div_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn safe_div_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Returns 0.0 for any /0 (mirrors wowlab_types::numeric::safe_div).
Sourcefn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
Mirrors wowlab_types::numeric::true_mod.
fn min_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn max_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float
fn floor_f(&mut self, v: Self::Float) -> Self::Float
fn ceil_f(&mut self, v: Self::Float) -> Self::Float
fn abs_f(&mut self, v: Self::Float) -> Self::Float
fn cmp_gt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_gte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_lt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_lte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Sourcefn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Epsilon-aware (mirrors wowlab_types::numeric::float_eq).
Sourcefn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
fn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool
Epsilon-aware (mirrors wowlab_types::numeric::float_ne).
fn cmp_eq_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_ne_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_gt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_gte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_lt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn cmp_lte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool
fn and_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool
fn or_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool
fn not_b(&mut self, a: Self::Bool) -> Self::Bool
fn bool_to_float(&mut self, v: Self::Bool) -> Self::Float
fn bool_to_int(&mut self, v: Self::Bool) -> Self::Int
fn int_to_float(&mut self, v: Self::Int) -> Self::Float
fn int_to_bool(&mut self, v: Self::Int) -> Self::Bool
Sourcefn float_to_bool(&mut self, v: Self::Float) -> Self::Bool
fn float_to_bool(&mut self, v: Self::Float) -> Self::Bool
Exact v != 0.0.
Sourcefn float_to_int(&mut self, v: Self::Float) -> Self::Int
fn float_to_int(&mut self, v: Self::Float) -> Self::Int
v as i64 (truncates).