Result<T, E>.err constructor
const
Result<T, E>.err (
- E error
Creates an Err with the given error
.
Examples
// prints "Err(error)"
print(Result<int, String>.err('error'));
Implementation
const factory Result.err(E error) = Err<T, E>;