Err<T, E> constructor

  1. @literal
const Err<T, E>(
  1. E error
)

Creates an erroneous Result with the given error.

Examples

// prints "Err(error)"
print(const Err<int, String>('error'));

Implementation

@literal
const Err(this.error) : super._();