Skip to content
ZOLO / TE183 Type · error

recovery requires the canonical Result wrapper

Compiler diagnostic TE183: recovery requires the canonical Result wrapper.

Why this fires

recover unwraps the success value of the standard Result<T, E> and handles its error payload. The operand must have a proved standard Result type. An ordinary value, any, or a user-defined enum named Result cannot be recovered.

let value = 42 recover { _ => 0 } // TE183

Fix it

Apply recovery to an actual Result returned by your operation:

fn value(result: Result<int, str>) -> int {
    result recover { _ => 0 }
}

Use match for an unrelated enum, including a user-defined Result.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en