Skip to main content

TeardownHooks

Trait TeardownHooks 

Source
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§

Source

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.

Source

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.

Source

fn discard(&self, block_id: &str)

Drop a block’s controller and process tracker at once, with no graceful phase.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§