Result to match against
Result to return when left carries an error
Either right or an Err
Return err(error) if left is err(error),
and return ok(right(x)) if left is ok(x)
Result to match against
Function to call when left carries an error
Either return value of right or an Err
Flatten (a promise of) a result that carries another (promise of a) result as a payload
Result to flatten
Promise that resolves flattened result
Flatten (a promise of) a result that carries another (promise of a) result as an error
Result to flatten
Promise that resolves flattened result
Return a promise that
resolves x if await result is ok(x)
and rejects with reason if await result is err(reason)
Result to unwrap
Promise that resolves carried payload
Return a promise that
resolves x if await result is ok(x)
and resolves def otherwise
Result to unwrap
Value to resolve when await result carries an error
Promise that resolves either carried payload or def
Return a promise that
resolves x if await result is ok(x)
and resolves def(await error) if await result is err(error)
Result to unwrap
Function to execute when await result carries an error
Promise that resolves either carried payload or return value of def
Clone a result
Result to clone
A new copy of result
If option is some(x), return ok(x),
otherwise return an Err
Option to match against
Result
If option is some(x), return ok(x),
otherwise return err(error)
Option to match against
Error to carry should option is a None
Result
If option is some(x), return ok(x),
otherwise return err(error())
Result to match against
Function to execute should option is a None
Result
Return a result that is carried as a payload by deepResult
Result to flatten
Result with a flattened payload
Return a result that is carried as an error by deepResult
Result to flatten
Result with a flattened error
Return err(x) if result is ok(x)
and return ok(x) if result is err(x)
Result to flip
Flipped result
Apply a function to the carried payload (if any)
Result to match against
Function to call when result carries a payload
Result that may carry fn's return value as a payload
Apply a function to the carried error (if any)
Result to match against
Function to call when result carries an error
Result that may carry fn's return value as an error
Apply handleErr to a carried error or handleOk to a carried payload
Result to match against
Function to call when result carries an error
Function to call when result carries a payload
Result that may carry handleErr's return value as an error or handleOk's as a payload
Match a result against a pair of functions
Result to match against
Functions to handle each case
Return value of either function
Return left if it carries a payload,
otherwise return right
Result to match against
Result to return when left carries an error
Either left or right
Return left if it carries a payload,
otherwise execute right with error of left and return the result
Result to match against
Function to call when left carries an error
Either left or return value of right
Transpose a Result of Option into an Option of Result
Result of Option
Option of Result
Return ok(x) if executing fn returns x,
and return err(error) if executing fn throws error
Function to execute
Arguments to pass to function
Result of function execution
Return x if result is ok(x),
and throw error if result is err(error)
Result to unwrap
Carried payload
Return x if result is ok(x),
otherwise return def
Result to unwrap
Value to return when result carries an error
Either carried payload or def
Return x if result is ok(x),
and return def(error) if result is err(error)
Result to unwrap
Function to call when result carries an error
Either carried payload of result or returning value of def
Generated using TypeDoc
Return
err(error)ifleftiserr(error), otherwise returnright