Skip to main content

Blackboard

Trait Blackboard 

Source
pub trait Blackboard {
Show 22 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>; // Provided methods fn code_graph(&self) -> Option<&dyn CodeGraph> { ... } fn reindex_file(&self, _abs: &Path) { ... }
}
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§

Source

fn workspace(&self) -> &Path

Source

fn progress_path(&self) -> PathBuf

Source

fn save_plan(&self, plan: &Plan) -> Result<(), RinneError>

Source

fn write_artifact(&self, name: &str, contents: &str) -> Result<(), RinneError>

Source

fn read_artifact(&self, name: &str) -> Result<String, RinneError>

Source

fn artifact_exists(&self, name: &str) -> bool

Source

fn write_transcript( &self, node_id: &str, contents: &str, ) -> Result<(), RinneError>

Source

fn write_context(&self, node_id: &str, contents: &str) -> Result<(), RinneError>

Source

fn append_progress(&self, line: &str) -> Result<(), RinneError>

Source

fn ensure_node(&self, node_id: &str) -> Result<(), RinneError>

Source

fn set_status( &self, node_id: &str, status: NodeStatus, ) -> Result<(), RinneError>

Source

fn set_worker(&self, node_id: &str, worker: &str) -> Result<(), RinneError>

Source

fn status(&self, node_id: &str) -> Result<NodeStatus, RinneError>

Source

fn incr_iteration(&self, node_id: &str) -> Result<u32, RinneError>

Source

fn iterations(&self, node_id: &str) -> Result<u32, RinneError>

Source

fn record_usage( &self, node_id: &str, worker: &str, usage: &Usage, ) -> Result<(), RinneError>

Source

fn total_iterations(&self) -> Result<u32, RinneError>

Source

fn total_usage(&self) -> Result<Usage, RinneError>

Source

fn set_meta(&self, key: &str, value: &str) -> Result<(), RinneError>

Source

fn meta(&self, key: &str) -> Result<Option<String>, RinneError>

Provided Methods§

Source

fn code_graph(&self) -> Option<&dyn CodeGraph>

Return the code graph if the blackboard was opened with graph support enabled, or None if the graph is disabled (--no-graph).

Source

fn reindex_file(&self, _abs: &Path)

Synchronously re-index a single file against the code graph. A no-op when code_graph() is None.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§