variant {matchr} | R Documentation |
Return the variant name of an enumerated type.
variant(x, ...)
x |
Enum object |
... |
objects passed to methods |
character with the name of the variant or NULL
x <- Result$Ok("hello world!")
variant(x) # "Ok"