Expand description
Parameterized outcome and resolution types.
Extends: std::{option, result}
Computation doesn’t just yield values, it organizes outcomes. This module refines how results, selections, and structured alternatives are formed, owned, transformed, and resolved, ensuring that every outcome finds its place.
It includes fundamental outcome types (Option, Result, OptRes),
structured ownership (Own) and mismatch-aware comparisons (Mismatch).
Macros§
- hook
- ⌗ 💱 Hooks one or more mutation steps into a value and returns it.
- morph
- ⌗ 💱 Morphs a value through one or more transformation steps and returns the result.
- unwrap
- ⚖️ An unwrapper macro that works in compile-time.
Structs§
- Mismatch
- ⚖️
Represents a mismatch between an expected
needand an encounteredhave. - Option
Fmt - 🖹
The type returned from
OptionExt::fmt_or_empty. - Option
FmtOr - 🖹
The type returned from
OptionExt::fmt_or. - Option
FmtOr Else - 🖹
The type returned from
OptionExt::fmt_or_else. - Own
- ⚖️
A return type encapsulating an owned state
Sand a valueV.
Enums§
- Infallible
- ∅ 🚩
coreThe error type for errors that can never occur. - Option
- ⚗️
coreA type that represents an optional value. - Result
- ⚖️
coreA type that represents either success (Ok) or failure (Err).
Traits§
- Hook
- ⌗ 💱 Hooks operations into a value without breaking its flow.
- Morph
- ⌗ 💱 Morphs a value by threading it through a function.
- OptRes
Ext - ⚖️
Extension trait providing additional methods for
OptRes. - Option
Ext - ⚖️
Extension trait providing additional methods for
Option. - Result
Ext - ⚖️
Extension trait providing additional methods for
Result.
Functions§
- serr
- ⚖️
Wraps the given
OptResvaluein aSome(Err(error)). - sok
- ⚖️
Wraps the given
OptResvaluein aSome(Ok(value)).
Type Aliases§
- Infallible
Result - ⚖️ ∅ 🚩 A result type whose error case can never occur.
- OptRes
- ⚖️ An optional result type that combines success, failure, and absence.