Result<T, E>.ok constructor

const Result<T, E>.ok(
  1. T value
)

Creates an Ok with the given value.

Examples

// prints "Ok(2)"
print(Result<int, String>.ok(2));

Implementation

const factory Result.ok(T value) = Ok<T, E>;