#[non_exhaustive]pub enum HookControl {
Proceed,
Break {
reason: StopReason,
},
Continue,
Skip,
}Expand description
A hook’s instruction for control flow (axis two). Data injection (axis one) goes
through the step’s &mut fields, not here.
Which variants are meaningful depends on the hook point: Break is available at any
step; Continue only at BeforeTurnEnd; Skip only at before Compact. The
engine downgrades out-of-place variants with a warning (see the validation in
apply_verdict).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Proceed
No intervention in control flow — the step proceeds normally with any data changes
already made on ctx. Corresponds to envelope control: null.
Break
End the current turn with a final stop reason. Usable from any step.
Fields
reason: StopReasonContinue
Does not end the turn; instead, loops back to the top of the cycle for another
round. Only meaningful in BeforeTurnEnd (and must be injected beforehand).
Skip
Skip the actual call for this step. Only meaningful for before Compact (veto
compaction).
Trait Implementations§
Source§impl Clone for HookControl
impl Clone for HookControl
Source§fn clone(&self) -> HookControl
fn clone(&self) -> HookControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HookControl
impl Debug for HookControl
Source§impl Default for HookControl
impl Default for HookControl
Source§fn default() -> HookControl
fn default() -> HookControl
impl Eq for HookControl
Source§impl PartialEq for HookControl
impl PartialEq for HookControl
Source§fn eq(&self, other: &HookControl) -> bool
fn eq(&self, other: &HookControl) -> bool
self and other values to be equal, and is used by ==.