into_result {matchr}R Documentation

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

nothing <- Option$None
into_result(nothing) # Err


[Package matchr version 0.1.0 Index]