Expand description
The <Role>Runtime role traits.
Framework-internal engine-side <Role>Runtime traits.
Each role trait pairs with a user-facing bb::<Role> Contract
trait in crate::contracts; the #[derive(bb::<Role>)]
macros bridge the user’s Contract impl into the engine-side
<Role>Runtime impl the engine dispatches against. Library
authors should not implement these directly — see
crate::contracts.
Each role trait follows the universal contract:
ⓘ
pub trait <Role>Runtime: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
fn atomic_opset(&self) -> AtomicOpsetDecl;
fn dispatch_atomic(
&mut self,
op_type: &str,
inputs: &[(&str, &dyn SlotValue)],
ctx: &mut RuntimeResourceRef<'_>,
) -> Result<DispatchResult, Self::Error>;
}Re-exports§
pub use aggregator::AggregatorRuntime;pub use backend::BackendRuntime;pub use codec::CodecRuntime;pub use data_source::DataSourceRuntime;pub use index::IndexRuntime;pub use model::ModelRuntime;pub use peer_selector::PeerSelectorRuntime;pub use protocol::ProtocolRuntime;
Modules§
- aggregator
AggregatorRuntime- role trait for aggregator implementations.- backend
BackendRuntime- framework-internal role trait for backend implementations.- codec
CodecRuntime- role trait for codec implementations.- data_
source DataSourceRuntime- role trait for data-source implementations.- index
IndexRuntime- role trait for vector-index implementations.- model
ModelRuntime- role trait for model implementations.- peer_
selector PeerSelectorRuntime- role trait for peer-sampling implementations.- protocol
ProtocolRuntime— framework-internal role trait for protocol implementations.