#[non_exhaustive]pub enum RotationAction {
Cast {
spell: String,
empower_rank: Option<u8>,
enabled: bool,
condition: Option<Condition>,
target_if: Option<TargetIf>,
},
Call {
list: String,
enabled: bool,
condition: Option<Condition>,
},
Run {
list: String,
enabled: bool,
condition: Option<Condition>,
},
SetVar {
name: String,
value: Condition,
enabled: bool,
condition: Option<Condition>,
},
ModifyVar {
name: String,
op: VarOp,
value: Condition,
enabled: bool,
condition: Option<Condition>,
},
Wait {
seconds: f64,
enabled: bool,
condition: Option<Condition>,
},
WaitUntil {
enabled: bool,
condition: Condition,
},
Pool {
enabled: bool,
extra: Option<f64>,
condition: Option<Condition>,
},
UseTrinket {
slot: u8,
empower_rank: Option<u8>,
enabled: bool,
condition: Option<Condition>,
},
UseItem {
name: String,
empower_rank: Option<u8>,
enabled: bool,
condition: Option<Condition>,
},
}Expand description
Parsed rotation action.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl Action
impl Action
pub fn enabled(&self) -> bool
Sourcepub fn condition(&self) -> Option<&Condition>
pub fn condition(&self) -> Option<&Condition>
The gating condition guarding this action, if any.
Sourcepub fn value(&self) -> Option<&Condition>
pub fn value(&self) -> Option<&Condition>
The value expression assigned by Action::SetVar / Action::ModifyVar.
Sourcepub fn target_if(&self) -> Option<&TargetIf>
pub fn target_if(&self) -> Option<&TargetIf>
The target_if selector attached to an Action::Cast.
Sourcepub fn conditions(&self) -> impl Iterator<Item = &Condition>
pub fn conditions(&self) -> impl Iterator<Item = &Condition>
Every condition subtree this action evaluates (value, gating condition, target_if).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromWasmAbi for Actionwhere
Self: DeserializeOwned,
impl FromWasmAbi for Actionwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &Action
impl IntoWasmAbi for &Action
Source§impl IntoWasmAbi for Action
impl IntoWasmAbi for Action
Source§impl JsonSchema for Action
impl JsonSchema for Action
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl OptionFromWasmAbi for Actionwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for Actionwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for Action
impl OptionIntoWasmAbi for Action
Source§impl RefFromWasmAbi for Actionwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for Actionwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§impl Tsify for Action
impl Tsify for Action
const DECL: &'static str = "/**\n * Parsed rotation action.\n */\nexport type Action = { type: \"cast\"; spell: string; empower_rank?: number; enabled?: boolean; condition?: Condition; target_if?: TargetIf } | { type: \"call\"; list: string; enabled?: boolean; condition?: Condition } | { type: \"run\"; list: string; enabled?: boolean; condition?: Condition } | { type: \"set_var\"; name: string; value: Condition; enabled?: boolean; condition?: Condition } | { type: \"modify_var\"; name: string; op: VarOp; value: Condition; enabled?: boolean; condition?: Condition } | { type: \"wait\"; seconds: number; enabled?: boolean; condition?: Condition } | { type: \"wait_until\"; enabled?: boolean; condition: Condition } | { type: \"pool\"; enabled?: boolean; extra?: number; condition?: Condition } | { type: \"use_trinket\"; slot: number; empower_rank?: number; enabled?: boolean; condition?: Condition } | { type: \"use_item\"; name: string; empower_rank?: number; enabled?: boolean; condition?: Condition };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for Actionwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for Actionwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for Action
impl VectorIntoWasmAbi for Action
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for Action
impl WasmDescribeVector for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.