> For the complete documentation index, see [llms.txt](https://draekien-industries.wpei.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://draekien-industries.wpei.me/reference.md).

# Reference

- [Option\<T> API](https://draekien-industries.wpei.me/reference/option.md): Every method on Option\<T>, grouped by what it does.
- [Creation](https://draekien-industries.wpei.me/reference/option/creation.md): The factory methods that build an Option\<T>.
- [Transform](https://draekien-industries.wpei.me/reference/option/transform.md): Methods that take an Option\<T> and give you back an Option.
- [Consume](https://draekien-industries.wpei.me/reference/option/consume.md): Methods that end the chain and hand you a plain value.
- [Side effects](https://draekien-industries.wpei.me/reference/option/side-effects.md): Run something against the value without changing it.
- [Nesting and conversion](https://draekien-industries.wpei.me/reference/option/nesting.md): Remove a level of nesting, or convert to a Result.
- [Collections](https://draekien-industries.wpei.me/reference/option/collections.md): Methods for working with a sequence of Option\<T>.
- [Result\<T, E> API](https://draekien-industries.wpei.me/reference/result.md): Every method on Result\<TOk, TErr>, grouped by what it does.
- [Creation](https://draekien-industries.wpei.me/reference/result/creation.md): The factory methods that build a Result\<TOk, TErr>.
- [Transform](https://draekien-industries.wpei.me/reference/result/transform.md): Methods that take a Result and give you back a Result.
- [Consume](https://draekien-industries.wpei.me/reference/result/consume.md): Methods that end the chain and hand you a plain value.
- [Side effects](https://draekien-industries.wpei.me/reference/result/side-effects.md): Run something against either side without changing it.
- [Nesting and conversion](https://draekien-industries.wpei.me/reference/result/nesting.md): Remove a level of nesting, or convert to an Option.
- [Collections](https://draekien-industries.wpei.me/reference/result/collections.md): Methods for working with a sequence of Result\<TOk, TErr>.
- [State overloads](https://draekien-industries.wpei.me/reference/state-overloads.md): Pass your data to a delegate instead of capturing it, and stop allocating a closure on every call.
- [Add-ons](https://draekien-industries.wpei.me/reference/packages.md): Packages that add to Waystone.Monads itself. None is required, and none changes how the library behaves.
- [Schemas](https://draekien-industries.wpei.me/reference/packages/schemas.md): Parse untrusted input into a type you could not have built without passing, and get every failure back at once.
- [Primitives](https://draekien-industries.wpei.me/reference/packages/schemas/primitives.md): The schemas you start a chain from — text, numbers, identifiers, dates, booleans, enums — and the rules that hang off each.
- [Composition](https://draekien-industries.wpei.me/reference/packages/schemas/composition.md): Add a rule, change the type, combine two schemas, and control the message and the code a failure carries.
- [Structures](https://draekien-industries.wpei.me/reference/packages/schemas/structures.md): Parse lists and dictionaries, read the path a violation was found at, and cap what a hostile payload can cost you.
- [Field sets](https://draekien-industries.wpei.me/reference/packages/schemas/field-sets.md): Turn several fields into one object, gate a parse without producing a value, and write a rule that spans two fields.
- [Asynchrony](https://draekien-industries.wpei.me/reference/packages/schemas/asynchrony.md): Rules that have to ask something — a database, a service — and the one place they may not go.
- [LINQ](https://draekien-industries.wpei.me/reference/packages/linq.md): C# query syntax over Option and Result, with no change in behaviour.
- [Logging](https://draekien-industries.wpei.me/reference/packages/logging.md): See every exception the library swallows, as a log entry with the call site attached.
- [Integrations](https://draekien-industries.wpei.me/reference/integrations.md): Packages that connect Waystone.Monads to a library you already use. None is required, and none changes how Waystone.Monads behaves.
- [Shouldly](https://draekien-industries.wpei.me/reference/integrations/shouldly.md): Shouldly assertions that take an Option or a Result, so a failing test names the state it found.
- [Dependency injection](https://draekien-industries.wpei.me/reference/integrations/dependency-injection.md): Lets a container write the library's configuration, so start-up code no longer calls MonadOptions.Configure by hand.
- [Hosting](https://draekien-industries.wpei.me/reference/integrations/hosting.md): Installs the container-registered configuration from the host's own start-up sequence, so there is no second call to forget.
- [FluentValidation](https://draekien-industries.wpei.me/reference/integrations/fluent-validation.md): Run a FluentValidation validator and get a Result back, with the failures attached to the error.
- [System.Text.Json](https://draekien-industries.wpei.me/reference/integrations/system-text-json.md): Serialize Option and Result with System.Text.Json, in a format a consumer already agreed to.
- [Newtonsoft.Json](https://draekien-industries.wpei.me/reference/integrations/newtonsoft-json.md): Serialize Option and Result with Newtonsoft.Json, in the same format the System.Text.Json package writes.
- [Source generation](https://draekien-industries.wpei.me/reference/source-generation.md): Mark an enum with \[ErrorCodeCatalog] and get its error codes as compile-time constants, generated at build time.
- [Error code catalogs](https://draekien-industries.wpei.me/reference/source-generation/error-code-catalogs.md): What \[ErrorCodeCatalog] emits: three nested classes, three extensions, and the fallback for a value that is not a declared member.
- [Code format language](https://draekien-industries.wpei.me/reference/source-generation/code-format.md): Shape the generated strings with {enum} and {member}, an optional casing, and one default for the whole assembly.
- [Reviewing generated codes](https://draekien-industries.wpei.me/reference/source-generation/reviewing-codes.md): Commit your error codes as a list, and make a divergence fail the build rather than a rename change a wire contract silently.
- [Generator diagnostics](https://draekien-industries.wpei.me/reference/source-generation/diagnostics.md): The WMGxxxx and WMSCxxxx codes. Each one marks something a generator cannot emit, or emitted differently from how you meant it.
- [Analyzers](https://draekien-industries.wpei.me/reference/analyzers.md): The Roslyn rules that ship inside Waystone.Monads, what each tier means, and how to turn a rule up or off.
- [Runtime bugs](https://draekien-industries.wpei.me/reference/analyzers/runtime-bugs.md): The WM1xxx rules. Each one marks code that compiles and then throws or quietly does the wrong thing at run time.
- [Idioms](https://draekien-industries.wpei.me/reference/analyzers/idioms.md): The WM2xxx rules. Your code works; each rule points at a clearer way to write it.
- [Migration aids](https://draekien-industries.wpei.me/reference/analyzers/migration-aids.md): The WM3xxx rules. They ship off, and you turn them on while you convert a codebase to the library.
- [Assertion rules](https://draekien-industries.wpei.me/reference/analyzers/assertion-rules.md): The WMSxxxx rules. They ship in Waystone.Monads.Shouldly and fire on test assertions only.
- [Severity presets](https://draekien-industries.wpei.me/reference/analyzers/severity-presets.md): Turn the analyzer up in one line, without listing thirty rules in your .editorconfig.
