Skip to main content

ApplyExecutor

Trait ApplyExecutor 

Source
pub trait ApplyExecutor {
    // Required method
    fn apply_component(
        &self,
        component_id: &str,
        proposed_version: &str,
    ) -> Result<(), String>;
}
Expand description

Trait for executing a single component update.

Implementations can invoke shell scripts, Rust-native installers, or be mocked for testing.

No Send + Sync bound: ApplyEngine::apply runs components synchronously on the calling thread (a sequential for loop, no spawn), and the engine is never moved across threads. Dropping the auto-trait bound lets an executor hold non-Send state that lives for the whole apply — e.g. the inline ratatui Terminal for the animated apply panel, which must be drawn from the same thread that drives the event loop.

Required Methods§

Source

fn apply_component( &self, component_id: &str, proposed_version: &str, ) -> Result<(), String>

Apply a single component update.

Returns Ok(()) on success, Err with a descriptive message on failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§