sealed trait PBFormat[A] extends PBScalarValueReader[A] with PBScalarValueWriter[A]
- Alphabetic
- By Inheritance
- PBFormat
- PBScalarValueWriter
- PBScalarValueReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
defaultValue: A
The default value to use as a fallback if the field is missing from the message.
The default value to use as a fallback if the field is missing from the message.
- Definition Classes
- PBScalarValueReader
-
abstract
def
isDefault(value: A): Boolean
Whether the given value would be encoded as the default value for its corresponding protobuf scalar type.
Whether the given value would be encoded as the default value for its corresponding protobuf scalar type.
If the field has the default value, we need to skip it when writing to protobuf.
Default values for the protobuf scalar types are as follows:
string -> "" bytes -> empty bytes bool -> false all numeric types -> zero enums -> the first defined enum value, which must be 0
For embedded message fields, there isn't a sensible default value so this method will always return false.
- Definition Classes
- PBScalarValueWriter
-
abstract
def
read(input: CodedInputStream): A
Read a value of type A from the current point in the input stream.
Read a value of type A from the current point in the input stream.
- Definition Classes
- PBScalarValueReader
-
abstract
def
wireType: Int
The wire type that this writer uses.
The wire type that this writer uses.
0 = varint 1 = fixed64 2 = length delimited 5 = fixed32 (3 and 4 are deprecated and should not be used)
- returns
one of the
WIRETYPE
constants listed in com.google.protobuf.WireFormat
- Definition Classes
- PBScalarValueWriter
-
abstract
def
writeWithoutTag(value: A, out: CodedOutputStream): Unit
Write the value to the output stream *without* prefixing a tag.
Write the value to the output stream *without* prefixing a tag.
- Definition Classes
- PBScalarValueWriter
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canBePacked: Boolean
Whether repeated fields of this type can be packed.
Whether repeated fields of this type can be packed. Primitive repeated fields (ints, floats, bools and enums) can be packed, and should be, unless overriden using a @pbUnpacked annotation.
- Definition Classes
- PBScalarValueWriter
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()