Result<S, E>.Error constructor

Result<S, E>.Error(
  1. E error
)

Implementation

factory Result.Error(E error) {
  return Result._(
      false,
      success: null,
      error: error
  );
}