result: The Result object

Description Usage Arguments

Description

is_result and as_result test whether an object is a result and coerce to a result object, respectively.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
as_result(x, ...)

## Default S3 method:
as_result(x, ...)

## S3 method for class 'error'
as_result(x, ...)

## S3 method for class 'result'
as_result(x, ...)

is_result(x)

## S3 method for class 'result'
print(x, ...)

result_is_ok(x)

## S3 method for class 'result'
result_is_ok(x)

## S3 method for class 'list'
result_is_ok(x)

result_is_error(x)

## S3 method for class 'result'
result_is_error(x)

## S3 method for class 'list'
result_is_error(x)

unwrap(x)

## S3 method for class 'result'
unwrap(x)

## S3 method for class 'list'
unwrap(x)

Arguments

x

An object.

...

Further arguments passed on to other methods (unused by the default methods).


atheriel/rrails documentation built on May 4, 2019, 1:07 p.m.