wire-runtime

wire-runtime / com.squareup.wire

Package com.squareup.wire

Types

Name Summary
AndroidMessage
(JVM)
abstract class AndroidMessage<M :Message<M,B>, B :Builder<M,B>> :Message<M,B>
An Android-specific Message which adds support for Parcelable.
AnyMessage class AnyMessage :Message<AnyMessage,Nothing>
TODO(oldergod): documentation TODO(oldergod): JSON
EnumAdapter
(JVM, js, native)
abstract expect class EnumAdapter<E :WireEnum> :ProtoAdapter<E>
An abstract ProtoAdapter that converts values of an enum to and from integers.
FieldEncoding enum class FieldEncoding
Message
(JVM, js, native)
abstract expect class Message<M :Message<M,B>, B :Builder<M,B>>
A protocol buffer message.
MessageSink
(JVM, js, native)
expect interface MessageSink<in T :Any>
A writable stream of messages.
MessageSource
(JVM, js, native)
expect interface MessageSource<out T :Any>
A readable stream of messages.
ProtoAdapter
(JVM, js, native)
abstract expect class ProtoAdapter<E>
ProtoReader class ProtoReader
Reads and decodes protocol message fields.
ProtoWriter class ProtoWriter
Utilities for encoding and writing protocol message fields.
Service interface Service
WireEnum interface WireEnum
Interface for generated Enum values to help serialization and deserialization.

Annotations

Name Summary
WireField annotation class WireField
Annotates generated Message fields with metadata for serialization and deserialization.
WireRpc annotation class WireRpc
For gRPC actions the path is formatted as /<service name>/<method name>. The path of the proto service below is /squareup.helloworld.Greeter/SayHello.

Functions

Name Summary
get
(JVM)
fun <T> get(value:T?, defaultValue:T):T
Returns value if it is not null; defaultValue otherwise. This is used to conveniently return a default value when a value is null. For example,