Skip to main content

Crate sim_lib_dispatch

Crate sim_lib_dispatch 

Source
Expand description

Generic functions and method dispatch 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).

Structs§

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.

Enums§

MethodRole
Role of a method within a generic function’s combination.

Statics§

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

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.
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.