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§
- Dispatch
Method - A single method belonging to a
GenericFunction. - Generic
Function - A named generic function: a set of
DispatchMethods sharing one name. - Method
Specificity - How specifically a method matched a particular call.
Enums§
- Method
Role - 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§
- Method
Body - The executable body of a
DispatchMethod. - Multimethod
- A generic function under its multimethod alias.