Module result

Source
Expand description

Resolving results.


result::{error}

Extends: std::{backtrace, error, option, panic, result}


Computation doesn’t just yield values, it reaches resolutions. This module refines how results are formed, owned, transformed, and resolved, ensuring that every outcome finds its place.

Modules§

error
Error-related types and traits.

Macros§

compile_error
core Causes compilation to fail with the given error message when encountered.
define_panic_handler
Defines a panic handler based on the chosen strategy.
panic_
core Panics the current thread.
todo
core Indicates unfinished code.
unimplemented
core Indicates unimplemented code.
unreachable
core Indicates unreachable code.
unwrap
An unwrapper macro that works in compile-time.

Structs§

Backtracestd
std A captured OS thread stack backtrace.
Mismatch
⚖️ Represents a mismatch between an expected need and an encountered have.
OptionFmt
The type returned from ExtOption::fmt_or_empty.
OptionFmtOr
The type returned from ExtOption::fmt_or.
OptionFmtOrElse
The type returned from ExtOption::fmt_or_else.
Own
⚖️ A return type encapsulating an owned state S and a value V.
Panic
🌐 Panic-related operations.
PanicAssertUnwindSafe
core A simple wrapper around a type to assert that it is unwind safe.
PanicHookInfostd
std Passed to std::panic::set_hook in std, where panics can have arbitrary payloads.
PanicInfo
core Passed to #[panic_handler] in no_std, where panics always carry a formatted message.
PanicLocation
core A struct containing information about the location of a panic.
ValueQuant
⚖️ A value with associated quantification.

Enums§

BacktraceStatusstd
std The current status of a backtrace.
Result
⚖️ core A type that represents either success (Ok) or failure (Err).

Traits§

Chain
Allows chaining transformations by passing values through a sequence of functions.
ExtOptRes
Extension trait providing additional methods for OptRes.
ExtOption
Extension trait providing additional methods for Option.
ExtResult
Extension trait providing additional methods for Result.
Hook
Allows attaching operations or side effects to a value without breaking its flow.
PanicRefUnwindSafe
core A marker trait which represents a shared reference considered unwind safe.
PanicUnwindSafe
core A marker trait which represents “panic safe” types in Rust.

Functions§

serr
Wraps the given OptRes value in a Some(Err(error)).
sok
Wraps the given OptRes value in a Some(Ok(value)).

Type Aliases§

OptRes
⚖️ An optional result for simple ternary logic.