ProtoValue

nscn.polaris2.protoc.runtime.ProtoValue
See theProtoValue companion enum
object ProtoValue

Attributes

Companion
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ProtoValue.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fromJava(value: Value): ProtoValue

Reads a Value.

Reads a Value.

A Value with no kind set reads as Null, matching protobuf's own JSON mapping. That is the one place the conversion is not injective: Null always writes back as an explicit NULL_VALUE.

Attributes

def fromJavaList(list: ListValue): Vector[ProtoValue]
def fromJavaStruct(struct: Struct): Map[String, ProtoValue]
def toJava(value: ProtoValue): Value
def toJavaList(values: Vector[ProtoValue]): ListValue
def toJavaStruct(fields: Map[String, ProtoValue]): Struct

Givens

Givens

Extensions

Extensions

extension (self: ProtoValue)
def apply(key: String): Option[ProtoValue]

Looks a key up in an Obj; None for any other shape.

Looks a key up in an Obj; None for any other shape.

Attributes

def asArr: Option[Vector[ProtoValue]]
def asBoolean: Option[Boolean]
def asDouble: Option[Double]
def asObj: Option[Map[String, ProtoValue]]
def asString: Option[String]
def isNull: Boolean