Skip to main content

Crate sim_lib_dispatch

Crate sim_lib_dispatch 

Source
Expand description

Generic functions, method dispatch, and neutral property mechanics for the SIM runtime.

The kernel defines the callable and operation contracts; this crate supplies the concrete dispatch organ (generic functions, multimethods, method specificity ordering). It also owns ordered own-property storage and bounded receiver-aware descriptor execution while leaving traversal order and precedence to language profiles.

Structs§

AccessContext
Budget and reentry state shared by one property operation.
AccessorDescriptor
A stored accessor-property descriptor.
DataDescriptor
A stored data-property descriptor.
DispatchMethod
A single method belonging to a GenericFunction.
GenericFunction
A named generic function: a set of DispatchMethods sharing one name.
MethodSpecificity
How specifically a method matched a particular call.
PropertyStore
Ordered own-property records keyed by caller-owned object identities.

Enums§

AccessError
Failure during bounded traversal or accessor interception.
AccessKind
Kind of guarded accessor invocation.
DefineError
Failure to define or delete an own property.
Descriptor
A data or accessor descriptor. The enum prevents mixed invalid records.
MethodRole
Role of a method within a generic function’s combination.

Statics§

RECIPES
Cookbook recipes for the dispatch organ, embedded at build time.

Traits§

MetaObjectProtocol
Language-neutral slot lookup for values with metadata-driven behavior.
PropertyHook
Caller-owned interpretation of accessor hook tokens.

Functions§

compare_specificity
Orders two specificities from least to most specific.
dispatch_combine_op_key
Operation key for method combination (around/before/primary/after).
dispatch_generic_op_key
Operation key for defining a generic function.
dispatch_inspect_op_key
Operation key for inspecting the applicable methods of a call.
dispatch_multimethod_op_key
Operation key for adding a method to a generic function (multimethod).
dispatch_op_keys
All operation keys contributed by the dispatch organ, in claim order.
dispatch_organ_symbol
Symbol identifying the dispatch organ in the claim store.
dispatch_specificity_op_key
Operation key for reporting method specificity for a call.
generic_function_value
Wraps generic as a runtime callable value that dispatches most-specific.
meta_index
Performs an indexed read with a caller-selected metaobject fallback slot.
publish_dispatch_organ_claims
Publishes the dispatch organ’s claims and operation keys into a Cx.
publish_dispatch_organ_claims_for_lib
Publishes dispatch organ claims as part of a loaded lib receipt.

Type Aliases§

MethodBody
The executable body of a DispatchMethod.
Multimethod
A generic function under its multimethod alias.