Skip to main content

sim_lib_dispatch/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Generic functions and method dispatch for the SIM runtime.
4//!
5//! The kernel defines the callable and operation contracts; this crate supplies
6//! the concrete dispatch organ (generic functions, multimethods, method
7//! specificity ordering).
8
9mod claims;
10mod generic;
11mod method;
12
13/// Cookbook recipes for the dispatch organ, embedded at build time.
14pub static RECIPES: sim_cookbook::EmbeddedDir =
15    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
16
17pub use claims::{
18    dispatch_combine_op_key, dispatch_generic_op_key, dispatch_inspect_op_key,
19    dispatch_multimethod_op_key, dispatch_op_keys, dispatch_organ_symbol,
20    dispatch_specificity_op_key, publish_dispatch_organ_claims,
21    publish_dispatch_organ_claims_for_lib,
22};
23pub use generic::{GenericFunction, Multimethod};
24pub use method::{DispatchMethod, MethodBody, MethodRole, MethodSpecificity, compare_specificity};
25
26#[cfg(test)]
27mod tests;