Skip to main content

Module functions

Module functions 

Source
Expand description

Function authoring helpers built on the shared Shape engine: overload cases, native function objects, and member-table construction.

Structs§

FunctionCase
One overload case of a FunctionObject: a shape-typed signature paired with the native code that runs when it is selected.
FunctionObject
A callable function object: a named set of shape-typed overload cases with selection driven by case priority and argument match score.
SelectedCase
The case chosen by overload selection together with its match result.

Functions§

case_result_shape
Borrow the result shape of a case, if it declares one.
case_shape
Borrow the argument shape of a single case.
empty_member_table
Builds an empty member table for classes that expose no members.
empty_shape_ref
Returns a nil shape reference, used where a function has no declared shape.
function_case_result_shape
Returns the result shape of a function overload case, if it declares one.
function_case_shape
Returns the argument shape of a function overload case.
function_cases
Borrow the overload cases of a function object.
overload
Merge several functions into one whose cases are the union of theirs.

Type Aliases§

NativeFunctionImpl
Native implementation backing a single FunctionCase.