☰
Index
Modules:
protobuf_serialization
,
protobuf_serialization/codec
,
protobuf_serialization/extension
,
protobuf_serialization/format
,
protobuf_serialization/internal
,
protobuf_serialization/reader
,
protobuf_serialization/sizer
,
protobuf_serialization/types
,
protobuf_serialization/writer
.
API symbols
computeFieldSize:
sizer: proc computeFieldSize[T: not byte](field: int; value: openArray[T]; ProtoType: type SomeProto; skipDefault: static bool): int
sizer: proc computeFieldSize(field: int; value: PBOption; ProtoType: type; skipDefault: static bool): int
sizer: proc computeFieldSize[T](field: int; value: seq[T]; ProtoType: type ProtobufExt; skipDefault: static bool): int
sizer: proc computeFieldSize[T: object and not PBOption](field: int; value: T; ProtoType: type pbytes; skipDefault: static bool): int
sizer: proc computeFieldSize[T: not seq and not PBOption](field: int; value: T; ProtoType: type ProtobufExt; _: static bool)
sizer: proc computeFieldSize[T: not object and (seq[byte] or not seq)](field: int; value: T; ProtoType: type SomeScalar; skipDefault: static bool): int
computeFieldSizePacked:
sizer: proc computeFieldSizePacked(field: int; values: openArray; ProtoType: type ProtobufExt): int
sizer: proc computeFieldSizePacked(field: int; value: openArray; ProtoType: type SomePrimitive): int
computeFieldSizePackedIt:
sizer: template computeFieldSizePackedIt[T](field: int; value: openArray[T]; ProtoType: type SomePrimitive; item: untyped): int
computeObjectSize:
sizer: proc computeObjectSize[T: object](value: T): int
computeSize:
protobuf_serialization: proc computeSize[T: object](_: type Protobuf; value: T): int
codec: proc computeSize(x: SomeFixed64 | SomeFixed32): int
codec: proc computeSize(x: FieldHeader): int
codec: proc computeSize(field: int; x: SomeScalar): int
codec: proc computeSize(x: SomeVarint): int
codec: proc computeSize(x: pstring | pbytes): int
computeSizePacked:
sizer: proc computeSizePacked[T: not byte](value: openArray[T]; ProtoType: type SomePrimitive): int
computeSizePackedIt:
sizer: template computeSizePackedIt[T: not byte](value: openArray[T]; ProtoType: type SomePrimitive; item: untyped): int
enumOneofFields:
internal: macro enumOneofFields(T: type; kName, kVal, fName, fTyp, body: untyped): untyped
ext:
types: template ext()
extensionDefaults:
extension: template extensionDefaults(Format: type Protobuf; ExtType: type; defaultWriteSeq = false; defaultReadSeq = false; defaultSeq = false; packed = false): untyped
extension: template extensionDefaults(Format: type Protobuf; ExtType: type; PbType: type SomeProto; defaultWriteSeq = false; defaultReadSeq = false; defaultSeq = false): untyped
FieldHeader:
codec: type FieldHeader
fieldNumber:
types: template fieldNumber(num: int)
fieldNumberOf:
internal: proc fieldNumberOf(T: type; fieldName: static string): int
finish:
types: proc finish(writer: ProtobufWriter): seq[byte]
fixed:
types: template fixed()
Fixed32:
codec: WireKind.Fixed32
fixed32:
codec: type fixed32
Fixed64:
codec: WireKind.Fixed64
fixed64:
codec: type fixed64
flatType:
internal: template flatType(T: type Protobuf; value: auto): type
get:
types: proc get(opt: PBOption): auto
implicit:
types: template implicit()
init:
codec: template init(_: type FieldHeader; index: int; wire: WireKind): FieldHeader
types: proc init(opt: var PBOption; val: auto)
types: proc init(T: type ProtobufReader; stream: InputStream; closeAfter: bool = true): T:type
types: proc init(T: type ProtobufWriter; stream: OutputStream; flags: static set[ProtobufFlags] = {}): T:type
isImplicit:
internal: proc isImplicit(T: type): bool
internal: proc isImplicit(T: type; fieldName: static string): bool
isNone:
types: proc isNone(opt: PBOption): bool
isOneof:
internal: proc isOneof(T: type; fieldName: static string): bool
isPacked:
internal: proc isPacked(T: type; fieldName: static string): Option[bool]
isProto:
internal: proc isProto(T: type): bool
isProto2:
internal: proc isProto2(T: type): bool
isProto3:
internal: proc isProto3(T: type): bool
isRequired:
internal: proc isRequired(T: type; fieldName: static string): bool
isSome:
types: proc isSome(opt: PBOption): bool
kind:
codec: template kind(p: FieldHeader): WireKind
LengthDelim:
codec: WireKind.LengthDelim
mget:
types: template mget(opt: var PBOption): untyped
mimeType:
format: template mimeType(T: type Protobuf): string
number:
codec: template number(p: FieldHeader): int
oneof:
types: template oneof()
oneofCaseOf:
internal: macro oneofCaseOf(T: type; value, fVar, fName, body: untyped): untyped
packed:
types: template packed(v: bool)
PBExplicit:
types: type PBExplicit
pbNone:
types: template pbNone(value: untyped): untyped
pbool:
codec: type pbool
PBOption:
types: object PBOption
pbSome:
types: proc pbSome[T: PBOption](optType: typedesc[T]; value: auto): T
types: template pbSome(value: untyped): untyped
pbytes:
codec: type pbytes
pdouble:
codec: type pdouble
penum:
codec: type penum
pfloat:
codec: type pfloat
pint:
types: template pint()
pint32:
codec: type pint32
pint64:
codec: type pint64
PreferredOutputType:
protobuf_serialization: template PreferredOutputType(T`gensym2: type Protobuf): type
proto:
types: template proto(edition = 2023)
proto2:
types: template proto2()
proto3:
types: template proto3()
Protobuf:
format: object Protobuf
ProtobufEOFError:
types: object ProtobufEOFError
ProtobufError:
types: object ProtobufError
ProtobufExt:
types: object ProtobufExt
ProtobufFlags:
types: enum ProtobufFlags
ProtobufGroupError:
types: object ProtobufGroupError
ProtobufMessageError:
types: object ProtobufMessageError
ProtobufReader:
types: type ProtobufReader
ProtobufReadError:
types: object ProtobufReadError
ProtobufValueError:
types: object ProtobufValueError
ProtobufWriter:
types: object ProtobufWriter
protoEdition:
internal: proc protoEdition(T: type): int
protoType:
internal: template protoType(InnerType, RootType, FieldType: untyped; fieldName: untyped)
pstring:
codec: type pstring
puint32:
codec: type puint32
puint64:
codec: type puint64
Reader:
protobuf_serialization: template Reader(T`gensym0: type Protobuf): type
ReaderType:
protobuf_serialization: template ReaderType(T`gensym0: type Protobuf): type
readFieldInto:
reader: proc readFieldInto(stream: InputStream; value: var PBOption; header: FieldHeader; ProtoType: type): bool
reader: proc readFieldInto[T: not PBOption](stream: InputStream; value: var seq[T]; header: FieldHeader; ProtoType: type ProtobufExt): bool
reader: proc readFieldInto[T: not byte](stream: InputStream; value: var seq[T]; header: FieldHeader; ProtoType: type SomeProto): bool
reader: proc readFieldInto[T: object and not PBOption](stream: InputStream; value: var T; header: FieldHeader; ProtoType: type pbytes): bool
reader: proc readFieldInto[T: not seq and not PBOption](stream: InputStream; value: var T; header: FieldHeader; ProtoType: type ProtobufExt): bool
reader: proc readFieldInto[T: not object and (seq[byte] or not seq)](stream: InputStream; value: var T; header: FieldHeader; ProtoType: type SomeProto): bool
readFieldPackedInto:
reader: proc readFieldPackedInto[T: not byte](stream: InputStream; value: var seq[T]; header: FieldHeader; ProtoType: type SomePrimitive): bool
reader: proc readFieldPackedInto[T](stream: InputStream; value: var T; header: FieldHeader; ProtoType: type ProtobufExt): bool
readFieldPackedIntoIt:
reader: template readFieldPackedIntoIt(stream: InputStream; header: FieldHeader; ProtoType: type SomePrimitive; body: untyped): bool
reader: template readFieldPackedIntoIt[T: not byte](stream: InputStream; value: var seq[T]; header: FieldHeader; ProtoType: type SomePrimitive; body: untyped): bool
readHeader:
codec: proc readHeader(input: InputStream): FieldHeader
readLength:
codec: proc readLength(input: InputStream): int
readValue:
codec: proc readValue[T: SomeVarint](input: InputStream; _: type T): T
codec: proc readValue[T: SomeFixed32 | SomeFixed64](input: InputStream; _: type T): T
codec: proc readValue[T: SomeLengthDelim](input: InputStream; _: type T): T
reader: proc readValue[T: object](reader: ProtobufReader; value: var T)
required:
types: template required()
setOneof:
internal: macro setOneof(fieldVar: var object; kName: static[string]; kVal: untyped; fName: static[string]; fVal: untyped): untyped
sfixed32:
codec: type sfixed32
sfixed64:
codec: type sfixed64
sint:
types: template sint()
sint32:
codec: type sint32
sint64:
codec: type sint64
skipValue:
codec: proc skipValue[T: SomeVarint](input: InputStream; _: type T)
codec: proc skipValue[T: SomeFixed32 | SomeFixed64](input: InputStream; _: type T)
codec: proc skipValue[T: SomeLengthDelim](input: InputStream; _: type T)
SomeFixed32:
codec: type SomeFixed32
SomeFixed64:
codec: type SomeFixed64
SomeLengthDelim:
codec: type SomeLengthDelim
SomePBInt:
codec: type SomePBInt
SomePrimitive:
codec: type SomePrimitive
SomeProto:
codec: type SomeProto
SomeScalar:
codec: type SomeScalar
SomeVarint:
codec: type SomeVarint
SupportedWireKinds:
codec: const SupportedWireKinds
supports:
protobuf_serialization: proc supports[T](_: type Protobuf; ty: typedesc[T]): bool
supportsPacked:
internal: proc supportsPacked(T: type; ProtoType: type ProtobufExt): bool
internal: proc supportsPacked(T: type; ProtoType: type SomeProto): bool
toBytes:
codec: template toBytes(x: fixed32 | fixed64): openArray[byte]
codec: template toBytes(header: FieldHeader): openArray[byte]
codec: template toBytes(x: pdouble): openArray[byte]
codec: template toBytes(x: pfloat): openArray[byte]
codec: template toBytes(x: sfixed32): openArray[byte]
codec: template toBytes(x: sfixed64): openArray[byte]
codec: template toBytes(x: SomeVarint): openArray[byte]
toValue:
types: converter toValue(opt: PBOption): auto
unsupportedProtoType:
internal: template unsupportedProtoType(FieldType, RootType, fieldName: untyped): untyped
validFieldNumber:
codec: template validFieldNumber(i: int; strict: bool = false): bool
valueOr:
types: template valueOr(opt: PBOption; def: untyped): untyped
Varint:
codec: WireKind.Varint
VarIntLengthPrefix:
types: ProtobufFlags.VarIntLengthPrefix
verifySerializable:
internal: proc verifySerializable[T](ty: typedesc[T])
versionInt:
format: template versionInt(T: type Protobuf): uint
WireKind:
codec: enum WireKind
wireKind:
codec: template wireKind(T: type SomeFixed32): WireKind
codec: template wireKind(T: type SomeFixed64): WireKind
codec: template wireKind(T: type SomeLengthDelim): WireKind
codec: template wireKind(T: type SomeVarint): WireKind
writeField:
codec: proc writeField(output: OutputStream; field: int; value: SomeScalar)
writer: proc writeField[T: not byte](stream: OutputStream; field: int; value: openArray[T]; ProtoType: type SomeProto; skipDefault: static bool = false)
writer: proc writeField(stream: OutputStream; field: int; value: PBOption; ProtoType: type; skipDefault: static bool = false)
writer: proc writeField[T](stream: OutputStream; field: int; value: seq[T]; ProtoType: type ProtobufExt; skipDefault: static bool = false)
writer: proc writeField[T: object and not PBOption](stream: OutputStream; field: int; value: T; ProtoType: type pbytes; skipDefault: static bool = false)
writer: proc writeField[T: not seq and not PBOption](stream: OutputStream; field: int; value: T; ProtoType: type ProtobufExt; _: static bool = false)
writer: proc writeField[T: not object and (seq[byte] or not seq)](stream: OutputStream; field: int; value: T; ProtoType: type SomeScalar; skipDefault: static bool = false)
writeFieldPacked:
writer: proc writeFieldPacked[T: not byte](output: OutputStream; field: int; values: openArray[T]; ProtoType: type ProtobufExt)
writer: proc writeFieldPacked[T: not byte](output: OutputStream; field: int; values: openArray[T]; ProtoType: type SomePrimitive)
writeFieldPackedIt:
writer: template writeFieldPackedIt[T: not byte](output: OutputStream; field: int; values: openArray[T]; ProtoType: type SomePrimitive; item: untyped): untyped
Writer:
protobuf_serialization: template Writer(T`gensym2: type Protobuf): type
WriterType:
protobuf_serialization: template WriterType(T`gensym2: type Protobuf): type
writeValue:
codec: proc writeValue(output: OutputStream; value: FieldHeader)
codec: proc writeValue(output: OutputStream; value: pbytes)
codec: proc writeValue(output: OutputStream; value: pstring)
codec: proc writeValue(output: OutputStream; value: SomeFixed32)
codec: proc writeValue(output: OutputStream; value: SomeFixed64)
codec: proc writeValue(output: OutputStream; value: SomeVarint)
writer: proc writeValue[T: object](writer: ProtobufWriter; value: T)