pub trait ModuleReload:
Send
+ Sync
+ 'static {
// Required methods
fn reload(
&self,
ctx: &Arc<Context>,
plugin: &str,
) -> Result<(), CordisError>;
fn rollback(
&self,
ctx: &Arc<Context>,
plugin: &str,
) -> Result<(), CordisError>;
}Expand description
Apply seam between the graph and whatever actually re-instantiates a plugin (loader re-apply, HMR swap, test double).
reload brings plugin to its new state; rollback re-registers the
PREVIOUS state after a failed reload, restoring the last-known-good
configuration. Implementations must be idempotent per call site — the
graph invokes each exactly once per affected plugin per transaction.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".