pub trait TeardownHooks: Send + Sync {
// Required methods
fn stop_now(&self, block_id: &str, graceful: bool) -> Result<(), String>;
fn replace_now(&self, ctrl: &dyn Controller) -> Result<(), String>;
fn discard(&self, block_id: &str);
}Expand description
The teardown’s entries for callers that have no AppState.
Required Methods§
Sourcefn stop_now(&self, block_id: &str, graceful: bool) -> Result<(), String>
fn stop_now(&self, block_id: &str, graceful: bool) -> Result<(), String>
controller.stop() and nothing else, as the watchdog and the pane’s AgentStop ask. Errors with
NOT_RUNNING when the block has no controller.
Sourcefn replace_now(&self, ctrl: &dyn Controller) -> Result<(), String>
fn replace_now(&self, ctrl: &dyn Controller) -> Result<(), String>
Stop the old controller’s own CLI process only, for a controller about to be replaced.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".