Checks if a Result is an Err type. This is a type guard that narrows the type of result to Err<E>.
Result
Err
result
Err<E>
The type of the successful value.
The type of the error value.
The result to check.
true if the result is Err, false otherwise.
true
false
Checks if a
Resultis anErrtype. This is a type guard that narrows the type ofresulttoErr<E>.