Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/19h/rsult
/ functions
Functions
264 in github.com/19h/rsult
⨍
Functions
264
◇
Types & classes
38
Method
or
* Returns this if Ok, otherwise returns the provided ResultAsync.
src/result-async.ts:398
Method
or
* On Ok, `or` returns self. We construct a new ResultOk with updated error type.
src/result.ts:389
Method
or
(res: Result<T, F>)
src/result.ts:561
Method
or
* Returns this if Some, otherwise returns the provided OptionAsync.
src/option-async.ts:279
Method
orElse
* Returns this if Some, otherwise evaluates the provided function.
src/option-async.ts:247
Method
or_else
* Returns `self` if `Some`, otherwise calls `fn` and returns the result.
src/option.ts:123
Method
or_else
* On Some, `or_else` returns self.
src/option.ts:382
Method
or_else
(fn: () => Option<U>)
src/option.ts:566
Method
or_else
* On Ok, `or_else` returns self. We construct a new ResultOk with updated error type.
src/result.ts:396
Method
or_else
(fn: (arg: E) => Result<T, F>)
src/result.ts:565
Method
replace
(value: T)
src/option.ts:416
Method
replace
* On None, replace returns Some with the provided value. * * Note: This differs from Rust's semantics where replace would mutate * self
src/option.ts:598
Function
syncFn
(x: number)
src/result-async.test.ts:415
Method
take
()
src/option.ts:583
Method
take_if
(predicate: (arg: T) => boolean)
src/option.ts:409
Method
take_if
(_predicate: (arg: T) => boolean)
src/option.ts:587
Method
toAsync
* Lifts this Result into a ResultAsync.
src/result-async.ts:624
Method
toAsync
* Lifts this Option into an OptionAsync.
src/option-async.ts:449
Method
toAsync
* Lifts this Option into an OptionAsync.
src/option-async.ts:456
Method
toPromise
* Returns the underlying Promise.
src/result-async.ts:223
Method
toPromise
* Returns the underlying Promise.
src/option-async.ts:152
Method
transmute
* Type-safe transmute that narrows the error type to `never`. * * Since this is `Ok`, there's no error, so `E` can safely become `never`.
src/result.ts:230
Method
transmute
* Type-safe transmute that narrows the value type to `never`. * * Since this is `Err`, there's no value, so `T` can safely become `never`.
src/result.ts:242
Method
transmute
* Transmutes to Ok<T, never>, proving there's no error.
src/result.ts:430
Method
transmute
* Transmutes to Err<never, E>, proving there's no value.
src/result.ts:595
Method
transpose
()
src/option.ts:465
Method
transpose
()
src/option.ts:630
Method
transpose
* Transposes a `Result` of an `Option` into an `Option` of a `Result`. * * - `Ok(None)` → `None` * - `Ok(Some(v))` → `Some(Ok(v))`
src/result.ts:214
Method
transpose
* Transposes Ok(Option<U>) into Option<Result<U, E>>.
src/result.ts:437
Method
transpose
* Transposes Err(e) into Some(Err(e)). * For Err, we always return Some(Err(e)) regardless of the expected Option type.
src/result.ts:603
Method
try
* Wraps a function that may throw, executing it and capturing the result. * * @example * ```typescript * const result = await Opti
src/option-async.ts:99
Method
unwrap
* Returns the contained `Some` value, or throws. * * @throws Error if this is `None`
src/option.ts:137
Method
unwrap
()
src/option.ts:332
Method
unwrap
()
src/option.ts:515
Method
unwrap
* Unwraps the Ok value, or throws.
src/result-async.ts:424
Method
unwrap
()
src/result.ts:365
Method
unwrap
()
src/result.ts:534
Method
unwrap
* Unwraps the Some value, or throws.
src/option-async.ts:326
Method
unwrapErr
* Unwraps the Err value, or throws.
src/result-async.ts:440
Method
unwrapOr
* Unwraps the Some value, or returns the provided default.
src/option-async.ts:334
Method
unwrapOrElse
* Unwraps the Some value, or computes a default.
src/option-async.ts:342
Method
unwrap_err
()
src/result.ts:373
Method
unwrap_err
()
src/result.ts:542
Method
unwrap_or
* Returns the contained `Some` value, or the provided default.
src/option.ts:142
Method
unwrap_or
(_optb: T)
src/option.ts:336
Method
unwrap_or
(optb: T)
src/option.ts:519
Method
unwrap_or
(_optb: T)
src/result.ts:401
Method
unwrap_or
(optb: T)
src/result.ts:570
Method
unwrap_or_default
()
src/option.ts:344
Method
unwrap_or_default
()
src/option.ts:527
Method
unwrap_or_else
* Returns the contained `Some` value, or computes it from `fn`.
src/option.ts:147
Method
unwrap_or_else
(_fn: () => T)
src/option.ts:340
Method
unwrap_or_else
(fn: () => T)
src/option.ts:523
Method
unwrap_or_else
(_fn: (arg: E) => T)
src/result.ts:405
Method
unwrap_or_else
(fn: (arg: E) => T)
src/result.ts:574
Method
unzip
()
src/option.ts:460
Method
unzip
()
src/option.ts:626
Method
xor
(optb: Option<T>)
src/option.ts:386
Method
xor
(optb: Option<T>)
src/option.ts:570
Method
zip
(other: Option<U>)
src/option.ts:423
Method
zip
(_other: Option<U>)
src/option.ts:603
Method
zip
* Zips this OptionAsync with another.
src/option-async.ts:389
Method
zip_with
(other: Option<U>, f: (val: T, other: U) => R)
src/option.ts:430
Method
zip_with
(_other: Option<U>, _f: (val: T, other: U) => R)
src/option.ts:607
← previous
201–264 of 264, ranked by callers