Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

orElseForResult

Calls recoverer and return its returned value if input is Err(E), otherwise returns input as Ok(T). This function can be used for control flow based on result values.

function orElseForResult<T, E, F>(input: Result<T, E>, recoverer: ResultTryRecoveryFromErrorFn<E, T, F>): Result<T, F>;
§
orElseForResult<T, E, F>(input: Result<T, E>, recoverer: ResultTryRecoveryFromErrorFn<E, T, F>): Result<T, F>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
recoverer: ResultTryRecoveryFromErrorFn<E, T, F>
[src]

§Return Type