into_option: Convert Object into Option

Description Usage Arguments Value Examples

View source: R/result_option.R

Description

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

Usage

1

Arguments

x

Object to be converted

...

Objects passed to methods

Value

an Enum object of class Option

Examples

1
2
an_error <- Result$Err("hello world!")
into_option(an_error) # None

matchr documentation built on Sept. 9, 2021, 5:07 p.m.

Related to into_option in matchr...