Result.isOk
$r.isOk() -> boolean
Description
Returns true if the Result object has a valid value and is not in a fail state.
$result = searchForUser()
if $result.isOk() {
$user = $result.get()
// (do something with the return value)
}
else {
print('Failed with code: ' ~ $result.getFailCode())
}