Extract the value or throw an error
Optional
error: ErrorOptional custom error to throw. If not provided, uses type-appropriate default error
The contained value
Returns this container if it has a value, otherwise returns the alternative
The alternative container
This container or the alternative
Extractable type class for data structures that can extract their values with various fallback strategies.
This interface is implemented by Option, Either, and other types that wrap values and need both safe and fallible extraction methods.
Extends Unsafe to provide exception-throwing operations alongside safe alternatives.