Learn R Programming

matchr (version 0.1.0)

into_result: Convert Object into Result

Description

Create a Result out of an object. By default the object is wrapped in an Ok variant. Some variants of Option are turned into Ok Results, while None variants are turned into Err Results

Usage

into_result(x, ...)

Arguments

x

Object to be converted

...

Objects passed to methods

Value

an Enum object of class Result

Examples

Run this code
# NOT RUN {
nothing <- Option$None
into_result(nothing) # Err

# }

Run the code above in your browser using DataLab