Returns the contained value or throws an error
Optional
error: ErrorOptional error to throw (implementations may have defaults)
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 safe extraction methods.