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>;
}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.
Traits§
- Aggregator
Runtime - Role trait for aggregator implementations.
- Backend
Runtime - Role trait for backend implementations. Universal contract per
docs/ROLES.md§2 with no per-role methods (Backend’s role opset isai.onnx v1which IS its atomic opset). - Codec
Runtime - Role trait for codec implementations.
- Data
Source Runtime - Role trait for data-source implementations.
- Index
Runtime - Role trait for vector-index implementations.
- Model
Runtime - Role trait for model implementations.
- Peer
Selector Runtime - Role trait for peer-sampling implementations.
- Protocol
Runtime - Role trait for protocol implementations.