Skip to main content

RotationBackend

Trait RotationBackend 

Source
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§

Source

fn const_bool(&mut self, v: bool) -> Self::Bool

Source

fn const_i32(&mut self, v: i32) -> Self::Int

Source

fn const_i64(&mut self, v: i64) -> Self::Int

Source

fn const_f64(&mut self, v: f64) -> Self::Float

Source

fn load_bool(&mut self, offset: usize) -> Self::Bool

Source

fn load_i32(&mut self, offset: usize) -> Self::Int

Source

fn load_i64(&mut self, offset: usize) -> Self::Int

Source

fn load_f64(&mut self, offset: usize) -> Self::Float

Source

fn store_bool(&mut self, offset: usize, v: Self::Bool)

Source

fn store_i32(&mut self, offset: usize, v: Self::Int)

Source

fn store_f64(&mut self, offset: usize, v: Self::Float)

Source

fn now(&mut self) -> Self::Float

Source

fn add_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

fn sub_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

fn mul_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

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).

Source

fn true_mod_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

fn min_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

fn max_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Float

Source

fn floor_f(&mut self, v: Self::Float) -> Self::Float

Source

fn ceil_f(&mut self, v: Self::Float) -> Self::Float

Source

fn abs_f(&mut self, v: Self::Float) -> Self::Float

Source

fn cmp_gt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Source

fn cmp_gte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Source

fn cmp_lt_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Source

fn cmp_lte_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Source

fn cmp_eq_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Epsilon-aware (mirrors wowlab_types::numeric::float_eq).

Source

fn cmp_ne_f(&mut self, a: Self::Float, b: Self::Float) -> Self::Bool

Epsilon-aware (mirrors wowlab_types::numeric::float_ne).

Source

fn cmp_eq_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn cmp_ne_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn cmp_gt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn cmp_gte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn cmp_lt_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn cmp_lte_i(&mut self, a: Self::Int, b: Self::Int) -> Self::Bool

Source

fn and_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool

Source

fn or_b(&mut self, a: Self::Bool, b: Self::Bool) -> Self::Bool

Source

fn not_b(&mut self, a: Self::Bool) -> Self::Bool

Source

fn bool_to_float(&mut self, v: Self::Bool) -> Self::Float

Source

fn bool_to_int(&mut self, v: Self::Bool) -> Self::Int

Source

fn int_to_float(&mut self, v: Self::Int) -> Self::Float

Source

fn int_to_bool(&mut self, v: Self::Int) -> Self::Bool

Source

fn float_to_bool(&mut self, v: Self::Float) -> Self::Bool

Exact v != 0.0.

Source

fn float_to_int(&mut self, v: Self::Float) -> Self::Int

v as i64 (truncates).

Source

fn select_f( &mut self, cond: Self::Bool, t: Self::Float, f: Self::Float, ) -> Self::Float

Source

fn select_i( &mut self, cond: Self::Bool, t: Self::Int, f: Self::Int, ) -> Self::Int

Source

fn select_b( &mut self, cond: Self::Bool, t: Self::Bool, f: Self::Bool, ) -> Self::Bool

Source

fn return_none_if(&mut self, cond: Self::Bool)

Source

fn return_cast_if(&mut self, cond: Self::Bool, spell_id: u32, empower_rank: u8)

Source

fn return_wait_if(&mut self, cond: Self::Bool, seconds: f32)

Source

fn return_pool_if(&mut self, cond: Self::Bool, target: f32)

Source

fn return_use_item_if( &mut self, cond: Self::Bool, gear_slot: u8, empower_rank: u8, )

Source

fn return_none(&mut self)

Provided Methods§

Source

fn record_action(&mut self, _record: ActionRecord<'_>)

Source

fn record_action_guarded( &mut self, _list_id: &str, _action_index: usize, _action: &RotationAction, _is_terminator: bool, _guard_held: Self::Bool, _failing: &Condition, )

Source

fn begin_list_recording(&mut self, _list_id: &str)

Source

fn end_list_recording(&mut self)

Implementors§

Source§

impl RotationBackend for InterpBackend<'_>

Source§

impl<'ctx> RotationBackend for JitBackend<'ctx, '_>

Source§

type Bool = IntValue<'ctx>

Source§

type Int = IntValue<'ctx>

Source§

type Float = FloatValue<'ctx>