> ## Documentation Index
> Fetch the complete documentation index at: https://dsrs.herumbshandilya.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dspy_rs::fx

> Functional DSRs (experimental): harnesses as plain async functions.

<Note>
  Generated from rustdoc JSON at `dspy-rs v0.7.3` (commit `b5da857`). Do not edit by hand; regenerate with `python3 docs/scripts/gen_api.py` (see the script header for the rustdoc commands). Item links lead to full signatures and method docs on docs.rs.
</Note>

Functional DSRs (experimental): harnesses as plain async functions.

## Re-exports

| Item                                                                                    | Description                                                                                                                                                                      |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`with_overlay`](https://docs.rs/dspy-rs/latest/dspy_rs/ir/bridge/fn.with_overlay.html) | Runs a future with an `ir::Overlay` as the ambient candidate — the overlay is unbound against the program into `Params` and scoped exactly like `with_params`. See `ir::bridge`. |

## Structs

| Item                                                                         | Description                                                                                                                                     |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [`FnModule`](https://docs.rs/dspy-rs/latest/dspy_rs/fx/struct.FnModule.html) | Adapts a plain async function into a `Module`, so functional harnesses plug into `evaluate_trainset`, metrics, and every other module consumer. |
| [`Params`](https://docs.rs/dspy-rs/latest/dspy_rs/fx/struct.Params.html)     | The optimizable state of a functional harness: named `PredictState`s — instructions and demos keyed by the names passed to `predict`.           |

## Functions

| Item                                                                           | Description                                                                                     |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| [`module`](https://docs.rs/dspy-rs/latest/dspy_rs/fx/fn.module.html)           | Wraps an async function as a `Module`. See `FnModule`.                                          |
| [`predict`](https://docs.rs/dspy-rs/latest/dspy_rs/fx/fn.predict.html)         | The atomic LM call of functional DSRs: one signature, one named parameter slot, one prediction. |
| [`with_params`](https://docs.rs/dspy-rs/latest/dspy_rs/fx/fn.with_params.html) | Runs a future with `params` as the ambient parameter set for every `predict` call inside it.    |
