Module overload

Source
Expand description

Function overload management and resolution.

This module provides types and utilities for managing function overloads, allowing multiple function implementations with different signatures to be registered under the same name.

§Key Types

§Overload Resolution

The system supports sophisticated overload resolution based on:

  • Argument count: Number of parameters
  • Argument types: CEL types of each parameter
  • Member vs global: Whether the function is called as a method

This enables natural function calls like:

// Different overloads of "format"
format("Hello")              // format(string) -> string
format("Hello %s", "World")  // format(string, string) -> string  
format(42)                   // format(int) -> string

Structs§

FunctionDeclOrImpl
Union type representing either a function declaration or implementation.
FunctionKindOverload
Function overload for a specific argument kind signature.
FunctionOverloads
Collection of function overloads grouped by argument kinds.

Traits§

FunctionTypeOverload
Trait for extracting argument types from function-like objects.