NOTE: This site is deprecated. The site will be turned down after January 31, 2023, and traffic will redirect to the new site at https://protobuf.dev. In the meantime, updates will be made only to protobuf.dev.

unpack

Stay organized with collections Save and categorize content based on your preferences.

//protobuf-kotlin/com.google.protobuf.kotlin/unpack

[JVM]
Content
inline fun <T : Message> Any.unpack(): T
More info

Returns the message of type T encoded in this com.google.protobuf.Any.

Throws

InvalidProtocolBufferException

if this com.google.protobuf.Any does not contain a T message.