pub struct Executor<'a> { /* private fields */ }Expand description
Executes handler intents by dispatching to the DataStore.
Implementations§
Source§impl<'a> Executor<'a>
impl<'a> Executor<'a>
pub fn new( datastore: &'a dyn DataStore, fs: &'a dyn Fs, paths: &'a dyn Pather, dry_run: bool, force: bool, provision_rerun: bool, auto_chmod_exec: bool, ) -> Self
Sourcepub fn execute(
&self,
intents: Vec<HandlerIntent>,
) -> Result<Vec<OperationResult>>
pub fn execute( &self, intents: Vec<HandlerIntent>, ) -> Result<Vec<OperationResult>>
Execute a list of handler intents, returning one result per atomic operation performed.
Conflicts (pre-existing files at target paths) are returned as
failed OperationResults — non-fatal, so other intents still
execute. Hard errors (I/O failures, command failures) stop
execution immediately via ?.
In dry-run mode, all intents are simulated regardless of errors.
Auto Trait Implementations§
impl<'a> Freeze for Executor<'a>
impl<'a> !RefUnwindSafe for Executor<'a>
impl<'a> Send for Executor<'a>
impl<'a> Sync for Executor<'a>
impl<'a> Unpin for Executor<'a>
impl<'a> UnsafeUnpin for Executor<'a>
impl<'a> !UnwindSafe for Executor<'a>
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