pbdirect
package pbdirect
- Alphabetic
- By Inheritance
- pbdirect
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
FieldIndex(values: List[Int]) extends Product with Serializable
A protobuf index, also known as the field number.
A protobuf index, also known as the field number. It holds a list of indices in order to support 'oneof' fields, which are encoded as shapeless Coproducts and have a different index for each branch.
-
final
case class
FieldModifiers(unpacked: Boolean) extends Product with Serializable
Modifiers for how a field should be encoded, derived from annotations such as @pbUnpacked.
-
sealed
trait
Fixed extends AnyRef
A modifier to signify that an integer field is encoded as a fixed-width Protobuf type (fixed32, fixed64, sfixed32 or sfixed64).
A modifier to signify that an integer field is encoded as a fixed-width Protobuf type (fixed32, fixed64, sfixed32 or sfixed64).
This modifier is used by attaching it to a field's type as a shapeless tag. e.g.
import shapeless.tag.@@ import pbdirect.Fixed case class MyMessage( signedInt: Int @@ Fixed, // will be encoded as a fixed32 signedLong: Long @@ Fixed, // will be encoded as a fixed64 )
It can also be combined with the Signed tag, e.g.
case class MyMessage( fixedSignedInt: Int @@ (Signed with Fixed), // will be encoded as an sfixed32 fixedSignedLong: Long @@ (Signed with Fixed) // will be encoded as an sfixed64 )
- trait LowPriorityPBScalarValueWriterImplicits extends AnyRef
- trait PBFieldReader[A] extends AnyRef
- trait PBFieldReaderImplicits extends AnyRef
- trait PBFieldWriter[A] extends AnyRef
- trait PBFieldWriterImplicits extends AnyRef
- sealed trait PBFormat[A] extends PBScalarValueReader[A] with PBScalarValueWriter[A]
- trait PBFormatImplicits extends AnyRef
- trait PBMessageReader[A] extends AnyRef
- trait PBMessageReaderImplicits extends AnyRef
- implicit final class PBMessageReaderOps extends AnyVal
- trait PBMessageWriter[A] extends AnyRef
- trait PBMessageWriterImplicits extends AnyRef
- implicit final class PBMessageWriterOps[A] extends AnyVal
- trait PBOneofFieldReader[A <: Coproduct] extends AnyRef
- trait PBOneofFieldReaderImplicits extends AnyRef
- trait PBOneofFieldWriter[A <: Coproduct] extends AnyRef
- trait PBOneofFieldWriterImplicits extends AnyRef
- trait PBProductReader[R <: HList, I <: HList] extends AnyRef
- trait PBProductReaderImplicits extends AnyRef
- trait PBProductWriter[A <: HList] extends AnyRef
- trait PBProductWriterImplicits extends AnyRef
- trait PBScalarValueReader[A] extends AnyRef
- trait PBScalarValueReaderImplicits extends PBScalarValueReaderImplicits_1
- trait PBScalarValueReaderImplicits_1 extends AnyRef
- trait PBScalarValueWriter[A] extends AnyRef
- trait PBScalarValueWriterImplicits extends LowPriorityPBScalarValueWriterImplicits
-
sealed
trait
Signed extends AnyRef
A modifier to signify that an integer field is encoded as a signed Protobuf type (sint32, sint64, sfixed32 or sfixed64).
A modifier to signify that an integer field is encoded as a signed Protobuf type (sint32, sint64, sfixed32 or sfixed64).
This modifier is used by attaching it to a field's type as a shapeless tag. e.g.
import shapeless.tag.@@ import pbdirect.Signed case class MyMessage( signedInt: Int @@ Signed, // will be encoded as an sint32 signedLong: Long @@ Signed // will be encoded as an sint64 )
It can also be combined with the Fixed tag, e.g.
case class MyMessage( fixedSignedInt: Int @@ (Signed with Fixed), // will be encoded as an sfixed32 fixedSignedLong: Long @@ (Signed with Fixed) // will be encoded as an sfixed64 )
-
sealed
trait
Unsigned extends AnyRef
A modifier to signify that an integer field is encoded as an unsigned Protobuf type (uint32 or uint64).
A modifier to signify that an integer field is encoded as an unsigned Protobuf type (uint32 or uint64).
This modifier is used by attaching it to a field's type as a shapeless tag. e.g.
import shapeless.tag.@@ import pbdirect.Unsigned case class MyMessage( signedInt: Int @@ Unsigned, // will be encoded as a uint32 signedLong: Long @@ Unsigned, // will be encoded as a uint64 )
-
case class
pbIndex(first: Int, more: Int*) extends Annotation with Product with Serializable
An annotation that must be applied to all fields in messages to tell pbdirect their index (a.k.a.
An annotation that must be applied to all fields in messages to tell pbdirect their index (a.k.a. field number)
e.g.
case class MyMessage( @pbIndex(1) a: Int, @pbIndex(2) b: String, @pbIndex(3, 4) c: String :+: Boolean :+: CNil // oneof field )
-
case class
pbUnpacked() extends Annotation with Product with Serializable
An annotation to specify that a primitive repeated field should **not** be encoded using the protobuf packed encoding.
An annotation to specify that a primitive repeated field should **not** be encoded using the protobuf packed encoding.
e.g.
case class MyMessage( @pbUnpacked() numbers: List[Int] )
Unless annotated with @pbUnpacked, all primitive repeated fields (ints, floats, booleans and enums) will be packed by default. This is the standard proto3 behaviour.
-
trait
Pos extends AnyRef
- Annotations
- @deprecated
- Deprecated
(Since version 0.5.2) Please use an enumeratum IntEnum instead
Value Members
- object PBFieldReader extends PBFieldReaderImplicits
- object PBFieldWriter extends PBFieldWriterImplicits
- object PBFormat extends PBFormatImplicits
- object PBMessageReader extends PBMessageReaderImplicits
- object PBMessageWriter extends PBMessageWriterImplicits
- object PBOneofFieldReader extends PBOneofFieldReaderImplicits
- object PBOneofFieldWriter extends PBOneofFieldWriterImplicits
- object PBProductReader extends PBProductReaderImplicits
- object PBProductWriter extends PBProductWriterImplicits
- object PBScalarValueReader extends PBScalarValueReaderImplicits
- object PBScalarValueWriter extends PBScalarValueWriterImplicits
- object Pos