#[repr(C)]pub struct EvalResult {
pub kind: u8,
pub empower_rank: u8,
pub spell_id: u32,
pub wait_time: f32,
}Expand description
Decoded form of the JIT’s packed-u64 return value.
Fields§
§kind: u8§empower_rank: u8One-based empower rank for cast and item-use actions; zero when omitted.
spell_id: u32Spell ID for KIND_CAST, or gear-slot repr for KIND_USE_ITEM.
wait_time: f32Wait seconds for KIND_WAIT, pool target for KIND_POOL.
Implementations§
Source§impl EvalResult
impl EvalResult
pub const NONE: Self
pub fn cast(spell: SpellIdx, empower_rank: u8) -> Self
pub fn wait(seconds: f32) -> Self
pub fn pool(target: f32) -> Self
pub fn use_item(slot: GearSlot, empower_rank: u8) -> Self
Sourcepub fn use_item_raw(slot_repr: u8, empower_rank: u8) -> Self
pub fn use_item_raw(slot_repr: u8, empower_rank: u8) -> Self
Use-item result from a raw GearSlot repr (the form the lowerer threads through).
pub fn is_none(&self) -> bool
pub fn is_cast(&self) -> bool
pub fn is_wait(&self) -> bool
pub fn is_pool(&self) -> bool
pub fn is_use_item(&self) -> bool
pub fn item_slot(&self) -> Option<GearSlot>
Trait Implementations§
Source§impl Clone for EvalResult
impl Clone for EvalResult
Source§fn clone(&self) -> EvalResult
fn clone(&self) -> EvalResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvalResult
impl Debug for EvalResult
Source§impl PartialEq for EvalResult
impl PartialEq for EvalResult
impl Copy for EvalResult
impl StructuralPartialEq for EvalResult
Auto Trait Implementations§
impl Freeze for EvalResult
impl RefUnwindSafe for EvalResult
impl Send for EvalResult
impl Sync for EvalResult
impl Unpin for EvalResult
impl UnsafeUnpin for EvalResult
impl UnwindSafe for EvalResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more