Serialized

data class Serialized<T>(value: T) : CallData<T>

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard
open val errorCode: Int?

Code for Error variants; null otherwise. Lets transports populate native error fields without pattern-matching on the variant.

Link copied to clipboard
open val errorMessage: String?

Human-readable message for Error variants; null otherwise.

Link copied to clipboard
open override val isBinary: Boolean
Link copied to clipboard
open val isError: Boolean

Convenience: true iff this is an Error variant.

Functions

Link copied to clipboard
open override fun readBinary(): RpcBinaryData

Get the RpcBinaryData for the binary data held by this call. If this is not binary data then throws IllegalStateException.

Link copied to clipboard
open override fun readSerialized(): T

Read the serialized content of this object. If this is binary data then throws IllegalStateException.

Link copied to clipboard
open override fun toString(): String