error


Description:

public static Result<T,E> error<T,E> (owned E err)

Creates a failed Result containing the given error.

Example:

    var r = Result.error<string,string> ("not found");
assert (r.isError ());

Parameters:

err

the error value.

Returns:

a failed Result.