pub struct PlaybookExecutor<E: ActionExecutor> { /* private fields */ }Expand description
Playbook execution engine.
Implementations§
Source§impl<E: ActionExecutor> PlaybookExecutor<E>
impl<E: ActionExecutor> PlaybookExecutor<E>
Sourcepub fn new(playbook: Playbook, executor: E) -> Self
pub fn new(playbook: Playbook, executor: E) -> Self
Create a new executor for the given playbook.
Sourcepub fn execute(&mut self, events: &[&str]) -> ExecutionResult
pub fn execute(&mut self, events: &[&str]) -> ExecutionResult
Execute the playbook by following the given event sequence.
Sourcepub fn current_state(&self) -> &str
pub fn current_state(&self) -> &str
Get the current state.
Auto Trait Implementations§
impl<E> Freeze for PlaybookExecutor<E>where
E: Freeze,
impl<E> RefUnwindSafe for PlaybookExecutor<E>where
E: RefUnwindSafe,
impl<E> Send for PlaybookExecutor<E>where
E: Send,
impl<E> Sync for PlaybookExecutor<E>where
E: Sync,
impl<E> Unpin for PlaybookExecutor<E>where
E: Unpin,
impl<E> UnsafeUnpin for PlaybookExecutor<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for PlaybookExecutor<E>where
E: UnwindSafe,
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