Expand description
The universal SlotValue trait.
The universal SlotValue trait — every value flowing through slot
sites (DSL outputs, wire payloads, syscall returns, role-method
returns) implements it via the blanket impl<T: Tensor> SlotValue
and per-primitive impls.
Canonical home for bb-runtime. Also hosts engine-side carriers
that step outside the serde-driven blanket impl path (today:
[BackendTensorCarrier], which holds a type-erased backend-owned
tensor handle).
Structs§
- Backend
Materialize Error - Typed error surfaced by
crate::roles::BackendRuntime::materialize_from_wire. The derive bridge converts the backend’s typed<T as crate::contracts::Backend>::Errorto this throughDisplay; the engine maps it ontocrate::bus::WireReceiveErrorKind::BackendMaterializeFailed. - Backend
Tensor Carrier - Engine-internal
SlotValuewrapping a backend-native tensor behind a type-erased handle. Built by the engine’s wire-decode path (decode_typed_fillbackend-mediated branch) from theBackend::materialize_from_wireresult; downstream graph ops downcastinnerto the backend’sSelf::Tensorto read the value. - Charged
Bytes Binding - Inventory entry mapping
TypeId → ChargedBytesFn. Submitted by [register_charged_bytes!]. - Runtime
Type Binding - Inventory entry mapping
TypeId → &'static TypeNode. Submitted by [register_type_node!]. - Wire
Decoder Binding - Inventory entry mapping
type_hash → WireDecodeFn. Emitted by [register_type_node!].
Enums§
- Slot
Value Error - Wire-coding failure for a
SlotValue. The default bincode path is infallible for vanilla serde derives; customSerializeimpls and missing receiver-side decoders surface here.
Traits§
- Slot
Value - Universal slot value. Slot-table values, op outputs, and
dispatch_atomicinputs are allBox<dyn SlotValue>/&dyn SlotValue. Local forwarding usesclone_boxed; wire + snapshot paths useto_wire_bytes.
Functions§
- charged_
bytes_ registry - Startup-built
TypeId → ChargedBytesFnmap drivingSlotValue::charged_bytes. - fnv1a_
64 const-callable FNV-1a 64-bit. Used bytype_hash_ofand compile-timeTY_*constant builders.- runtime_
type_ registry - Startup-built
TypeId → &TypeNodemap drivingSlotValue::runtime_type. - type_
hash_ of - FNV-1a 64-bit hash of
std::any::type_name::<T>(). Deterministic across runs of the same Rust toolchain; stamped ontoSlotFill.type_hashand matched on the receive side. - wire_
decoder_ registry - Startup-built
type_hash → WireDecodeFnmap used byCompositeValue’s wire codec to materialise typed children.
Type Aliases§
- Charged
Bytes Fn - Per-type charged-bytes resolver. Takes the carrier’s erased
&dyn Anyand returns the byte count. - Wire
Decode Fn - Wire-decode fn for a known concrete type.