Skip to main content

Module contract

Module contract 

Source
Expand description

Module and function contracts, invocation arguments, and outcomes.

Structs§

Args
Validated arguments for a function invocation.
Assumption
An explicit method assumption.
Deprecation
Deprecation metadata.
ErrorEstimate
A validated numerical error estimate, only present when the method can actually provide one.
Example
A documented, executable example. CI runs every example and checks the expectation so documentation cannot drift from behaviour.
FunctionDescriptor
The authoritative function declaration.
FunctionRef
A reference to a function and its version.
Module
A statically registered module.
ModuleDescriptor
Metadata describing a module.
Outcome
A successful invocation outcome.
ParamDescriptor
A function parameter.
SimpleFunction
A function implemented by a plain function pointer plus its descriptor.
Trace
A bounded execution trace of computational steps. This is not a narrative explanation and contains no hidden reasoning.
TraceStep
One bounded trace step.
Warning
Warning attached to a result.

Enums§

AssumptionSource
Where an assumption came from.
CostClass
Rough cost class, used for documentation and batch budgeting.
Determinism
Determinism class of a function.
ExampleExpectation
Expected outcome of a documented example.
Purity
Whether a function has side effects.

Traits§

Function
The callable interface implemented by every function in every module.

Functions§

require_mode
Helper to require that the context mode is supported by a function.