variant: Enum Variant

Description Usage Arguments Value Examples

View source: R/check.R

Description

Return the variant name of an enumerated type.

Usage

1

Arguments

x

Enum object

...

objects passed to methods

Value

character with the name of the variant or NULL

Examples

1
2
x <- Result$Ok("hello world!")
variant(x)  # "Ok"

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

Related to variant in matchr...