GeneratedOneof

nscn.polaris2.protoc.runtime.GeneratedOneof

Base trait of the nested enum generated for a proto oneof.

enum Contact extends GeneratedOneof derives CanEqual:
 case Empty
 case Email(value: String)
 case Phone(value: String)

The accessors are named oneofNumber / oneofValue rather than the obvious number / value so they cannot collide with the value parameter each case already carries.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def isEmpty: Boolean
def oneofNumber: Int

Field number of the case that is set, or 0 when empty.

Field number of the case that is set, or 0 when empty.

Attributes

def oneofValue: Any

Payload of the case that is set, or () when empty.

Payload of the case that is set, or () when empty.

Attributes

Concrete methods

final def isDefined: Boolean
final def valueOption: Option[Any]