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

mapOrElseForResult

Maps a Result<T, E> to U by applying transformer to a contained Ok(T) value in input, or a recoverer function to a contained Err(E) value in input. This function can be used to unpack a successful result while handling an error.

function mapOrElseForResult<T, E, U>(
input: Result<T, E>,
recoverer: RecoveryFromErrorFn<E, U>,
transformer: TransformFn<T, U>,
): U;
§
mapOrElseForResult<T, E, U>(input: Result<T, E>, recoverer: RecoveryFromErrorFn<E, U>, transformer: TransformFn<T, U>): U
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
recoverer: RecoveryFromErrorFn<E, U>
[src]
§
transformer: TransformFn<T, U>
[src]

§Return Type