pub(crate) mod codemgr;
pub(crate) mod dynamic_supervisor;
pub mod factory;
pub mod loader;
pub mod migration;
pub(crate) mod spawn_listener;
pub(crate) mod tests;
pub(crate) mod types;
pub use codemgr::{CodeManager, CodePath};
pub use dynamic_supervisor::DynamicSupervisor;
pub use factory::ActorFactory;
pub use loader::{DynamicLibrary, LibraryLoader};
pub use migration::{MigrationFn, MigrationRegistry, StateMigration};
pub use spawn_listener::SpawnListener;
pub use types::{ActorSpec, ActorVTable, WorkItem, WorkerMessage};
#[derive(Debug, Clone)]
pub enum CodeChangeResult {
Loaded {
module: String,
new_version: String,
},
Upgraded {
module: String,
new_version: String,
old_version: String,
},
}
pub trait HotSwappable {
fn current_version(&self) -> String;
fn serialize_state(&self) -> Vec<u8>;
fn deserialize_state(state: Vec<u8>) -> Result<Self, crate::error::RuntimeError>
where
Self: Sized;
}