Chains a new Option to the current one if it is Some, but asynchronously.
The async mapper function to apply to the value if it is Some.
A new Option with the mapped value if it is Some, otherwise the value as-is.
Returns the value if it is a Left, otherwise returns a default value asynchronously.
The default value (as-is or produced from a callback) to return if the value is a Right.
The value if it is a Left, otherwise the default value.
Maps the value if it is Some, but asynchronously.
The async mapper function to apply to the value if it is Some.
A new Option with the mapped value if it is Some, otherwise the Option as-is.
Maps the value if it is a Left asynchronously, otherwise returns the value as-is.
The async function to apply to the value if it is a Left.
A new Either with the mapped value if it is a Left, otherwise the value as-is.
Maps the value if it is a Right asynchronously, otherwise returns the value as-is.
The async function to apply to the value if it is a Right.
A new Either with the mapped value if it is a Right, otherwise the value as-is.
Matches the jonad by calling the appropriate callback based on the value type asynchronously.
If the value is a Left, this callback is called with the value.
If the value is a Right, this callback is called with the value.
The result of the callback that was called.
Maps the Option to a promised Result.
If the Option is Some, the value will be wrapped in an Ok. If the Option is None, the provided error will be returned.
The error to return if the Option is None.
A Result of the Option.
Maps the Option to a promised Result, creating a new error from the message if the Option is None.
The message to create the error from if the Option is None.
A Result of the Option.
Returns the value if it is a Right, otherwise returns a default value asynchronously.
The default value (as-is or produced from a callback) to return if the value is a Left.
The value if it is a Right, otherwise the default value.
Asynchronously applies a function to the value if it is a Right, returning itself.
The async function to apply to the value if it is a Right.
The Either as-is.
Returns the value if it is Some, otherwise returns a default value asynchronously.
The default value (as-is or produced from a callback) to return if the value is None.
The value if it is an Ok, otherwise the default value.
An Option jonad.
Represents a value that may or may not be present. The left-side value is
Some
, while the right-side value isNone
(represented by the valuenull
).