ok abstract method
T?
ok()
Converts from Result<T, E>
to T?
.
Examples
Basic usage:
Result<int, String> x = Ok(2);
expect(x.ok(), 2);
Result<int, String> x = Err('An error occured');
expect(x.ok(), null);
Implementation
T? ok();