pub trait Blackboard {
Show 20 methods
// Required methods
fn workspace(&self) -> &Path;
fn progress_path(&self) -> PathBuf;
fn save_plan(&self, plan: &Plan) -> Result<(), RinneError>;
fn write_artifact(
&self,
name: &str,
contents: &str,
) -> Result<(), RinneError>;
fn read_artifact(&self, name: &str) -> Result<String, RinneError>;
fn artifact_exists(&self, name: &str) -> bool;
fn write_transcript(
&self,
node_id: &str,
contents: &str,
) -> Result<(), RinneError>;
fn write_context(
&self,
node_id: &str,
contents: &str,
) -> Result<(), RinneError>;
fn append_progress(&self, line: &str) -> Result<(), RinneError>;
fn ensure_node(&self, node_id: &str) -> Result<(), RinneError>;
fn set_status(
&self,
node_id: &str,
status: NodeStatus,
) -> Result<(), RinneError>;
fn set_worker(&self, node_id: &str, worker: &str) -> Result<(), RinneError>;
fn status(&self, node_id: &str) -> Result<NodeStatus, RinneError>;
fn incr_iteration(&self, node_id: &str) -> Result<u32, RinneError>;
fn iterations(&self, node_id: &str) -> Result<u32, RinneError>;
fn record_usage(
&self,
node_id: &str,
worker: &str,
usage: &Usage,
) -> Result<(), RinneError>;
fn total_iterations(&self) -> Result<u32, RinneError>;
fn total_usage(&self) -> Result<Usage, RinneError>;
fn set_meta(&self, key: &str, value: &str) -> Result<(), RinneError>;
fn meta(&self, key: &str) -> Result<Option<String>, RinneError>;
}Expand description
The blackboard seam: the loop engine’s only door to persistence. The concrete
impl (file tree + SQLite) lives in rinne-core.
Not Send + Sync: the SQLite-backed impl owns a !Sync connection and the
engine runs on a dedicated current-thread runtime, so a &dyn Blackboard is
used single-threaded.
Required Methods§
fn workspace(&self) -> &Path
fn progress_path(&self) -> PathBuf
fn save_plan(&self, plan: &Plan) -> Result<(), RinneError>
fn write_artifact(&self, name: &str, contents: &str) -> Result<(), RinneError>
fn read_artifact(&self, name: &str) -> Result<String, RinneError>
fn artifact_exists(&self, name: &str) -> bool
fn write_transcript( &self, node_id: &str, contents: &str, ) -> Result<(), RinneError>
fn write_context(&self, node_id: &str, contents: &str) -> Result<(), RinneError>
fn append_progress(&self, line: &str) -> Result<(), RinneError>
fn ensure_node(&self, node_id: &str) -> Result<(), RinneError>
fn set_status( &self, node_id: &str, status: NodeStatus, ) -> Result<(), RinneError>
fn set_worker(&self, node_id: &str, worker: &str) -> Result<(), RinneError>
fn status(&self, node_id: &str) -> Result<NodeStatus, RinneError>
fn incr_iteration(&self, node_id: &str) -> Result<u32, RinneError>
fn iterations(&self, node_id: &str) -> Result<u32, RinneError>
fn record_usage( &self, node_id: &str, worker: &str, usage: &Usage, ) -> Result<(), RinneError>
fn total_iterations(&self) -> Result<u32, RinneError>
fn total_usage(&self) -> Result<Usage, RinneError>
fn set_meta(&self, key: &str, value: &str) -> Result<(), RinneError>
fn meta(&self, key: &str) -> Result<Option<String>, RinneError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".