Skip to main content

Module type_registry

Module type_registry 

Source
Expand description

Type registry for adam-lang cell declarations.

TypeRegistry maps DSL type-name strings to Rust types. Each registration stores type-erased function pointers covering:

  • push_arg_fn — registers a [cel_runtime::DynSegment::push_arg] op
  • add_cell_fn — creates a sheet cell from a Box<dyn Any> value
  • add_source_fn — creates a source-kind sheet cell (via [Sheet::add_source]) from a Box<dyn Any> value
  • call_dyn_fn — an explicit checked host-call convenience for registered leaves
  • default_fn — constructs a default Box<dyn Any> (when Default is available)

Persistent compound storage owns canonical values, not external tuple wrappers wrappers. Sheet construction freezes complete descriptors and raw-frame adapters once; the legacy external tuple helpers below are host-boundary utilities only.

§Example

use adam_lang::TypeRegistry;
use std::any::TypeId;

let reg = TypeRegistry::new();
assert_eq!(reg.get("f64").unwrap().type_id, TypeId::of::<f64>());

Structs§

RegistryTypeResolver
A CEL-facing snapshot of one TypeRegistry’s registered leaf types.
TypeEntry
Metadata for a single type registered in a TypeRegistry.
TypeRegistry
Maps DSL type names to Rust types for adam-lang cell declarations.

Enums§

TypeShape
Identifies a declared cell recursively, independently of its erased storage carrier.

Type Aliases§

AddCellFn
Adds a typed cell from a boxed value and returns its handle.
AddConditionalFn
Calls Sheet::add_conditional with the appropriate concrete type.
AddSourceFn
Adds a typed source cell (via [Sheet::add_source]) from a boxed value and returns its handle.
CallDynFn
Executes a compiled segment with the supplied inputs and boxes the result.
PushArgFn
Registers a push_arg<T>(index) op on a segment.