pub enum PhaseInstruction {
Static(String),
Dynamic(Arc<dyn Fn(&State) -> String + Send + Sync>),
}Expand description
Instruction source for a phase — either a fixed string or a closure over state.
Variants§
Static(String)
A fixed instruction string.
Dynamic(Arc<dyn Fn(&State) -> String + Send + Sync>)
A dynamic instruction derived from current state.
Implementations§
Source§impl PhaseInstruction
impl PhaseInstruction
Sourcepub fn resolve_with_modifiers(
&self,
state: &State,
modifiers: &[InstructionModifier],
) -> String
pub fn resolve_with_modifiers( &self, state: &State, modifiers: &[InstructionModifier], ) -> String
Resolve the instruction and apply modifiers, returning the composed instruction.
Auto Trait Implementations§
impl Freeze for PhaseInstruction
impl !RefUnwindSafe for PhaseInstruction
impl Send for PhaseInstruction
impl Sync for PhaseInstruction
impl Unpin for PhaseInstruction
impl !UnwindSafe for PhaseInstruction
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