Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · protowkt

Docs

std/protowkt

On this page

Index

Types

Timestamp

struct Timestamp {
  seconds: Int = 0
  nanos: Int = 0
} derive Eq

Source: std/protowkt.xo:12

Duration

struct Duration {
  seconds: Int = 0
  nanos: Int = 0
} derive Eq

Source: std/protowkt.xo:17

Empty

struct Empty {
  unknown: Bytes = b""
} derive Eq

Source: std/protowkt.xo:22

FieldMask

struct FieldMask {
  paths: List[Str] = []
} derive Eq

Source: std/protowkt.xo:27

Any

struct Any {
  type_url: Str = ""
  value: Bytes = b""
} derive Eq

google.protobuf.Any: type_url names the packed message (type.googleapis.com/pkg.Msg), value is its wire bytes.

Source: std/protowkt.xo:33

DoubleValue

struct DoubleValue { value: Float = 0.0 }

Source: std/protowkt.xo:38

FloatValue

struct FloatValue { value: Float32 = 0.0 }

Source: std/protowkt.xo:39

Int64Value

struct Int64Value { value: Int = 0 } derive Eq

Source: std/protowkt.xo:40

UInt64Value

struct UInt64Value { value: UInt64 = 0 } derive Eq

Source: std/protowkt.xo:41

Int32Value

struct Int32Value { value: Int = 0 } derive Eq

Source: std/protowkt.xo:42

UInt32Value

struct UInt32Value { value: Int = 0 } derive Eq

Source: std/protowkt.xo:43

BoolValue

struct BoolValue { value: Bool = false } derive Eq

Source: std/protowkt.xo:44

StringValue

struct StringValue { value: Str = "" } derive Eq

Source: std/protowkt.xo:45

BytesValue

struct BytesValue { value: Bytes = b"" } derive Eq

Source: std/protowkt.xo:46

Value

enum Value {
  Unset
  Null
  Number(v: Float)
  Text(v: Str)
  Flag(v: Bool)
  Object(v: Struct)
  Array(v: ListValue)
}

google.protobuf.Value: the kind that is set, Unset when none is.

Source: std/protowkt.xo:49

Struct

struct Struct {
  fields: Map[Str, Value] = {}
}

Source: std/protowkt.xo:59

ListValue

struct ListValue {
  values: List[Value] = []
}

Source: std/protowkt.xo:63

Functions

encode_timestamp

fn encode_timestamp(m: Timestamp) -> Bytes

Source: std/protowkt.xo:67

decode_timestamp

fn decode_timestamp(b: Bytes) -> Timestamp ! protobuf.ProtoErr

Source: std/protowkt.xo:68

encode_duration

fn encode_duration(m: Duration) -> Bytes

Source: std/protowkt.xo:69

decode_duration

fn decode_duration(b: Bytes) -> Duration ! protobuf.ProtoErr

Source: std/protowkt.xo:70

encode_empty

fn encode_empty(m: Empty) -> Bytes

Source: std/protowkt.xo:71

decode_empty

fn decode_empty(b: Bytes) -> Empty ! protobuf.ProtoErr

Source: std/protowkt.xo:72

encode_field_mask

fn encode_field_mask(m: FieldMask) -> Bytes

Source: std/protowkt.xo:73

decode_field_mask

fn decode_field_mask(b: Bytes) -> FieldMask ! protobuf.ProtoErr

Source: std/protowkt.xo:74

encode_any

fn encode_any(m: Any) -> Bytes

Source: std/protowkt.xo:75

decode_any

fn decode_any(b: Bytes) -> Any ! protobuf.ProtoErr

Source: std/protowkt.xo:76

encode_double_value

fn encode_double_value(m: DoubleValue) -> Bytes

Source: std/protowkt.xo:77

decode_double_value

fn decode_double_value(b: Bytes) -> DoubleValue ! protobuf.ProtoErr

Source: std/protowkt.xo:78

encode_float_value

fn encode_float_value(m: FloatValue) -> Bytes

Source: std/protowkt.xo:79

decode_float_value

fn decode_float_value(b: Bytes) -> FloatValue ! protobuf.ProtoErr

Source: std/protowkt.xo:80

encode_int64_value

fn encode_int64_value(m: Int64Value) -> Bytes

Source: std/protowkt.xo:81

decode_int64_value

fn decode_int64_value(b: Bytes) -> Int64Value ! protobuf.ProtoErr

Source: std/protowkt.xo:82

encode_uint64_value

fn encode_uint64_value(m: UInt64Value) -> Bytes

Source: std/protowkt.xo:83

decode_uint64_value

fn decode_uint64_value(b: Bytes) -> UInt64Value ! protobuf.ProtoErr

Source: std/protowkt.xo:84

encode_int32_value

fn encode_int32_value(m: Int32Value) -> Bytes

Source: std/protowkt.xo:85

decode_int32_value

fn decode_int32_value(b: Bytes) -> Int32Value ! protobuf.ProtoErr

Source: std/protowkt.xo:86

encode_uint32_value

fn encode_uint32_value(m: UInt32Value) -> Bytes

Source: std/protowkt.xo:87

decode_uint32_value

fn decode_uint32_value(b: Bytes) -> UInt32Value ! protobuf.ProtoErr

Source: std/protowkt.xo:88

encode_bool_value

fn encode_bool_value(m: BoolValue) -> Bytes

Source: std/protowkt.xo:89

decode_bool_value

fn decode_bool_value(b: Bytes) -> BoolValue ! protobuf.ProtoErr

Source: std/protowkt.xo:90

encode_string_value

fn encode_string_value(m: StringValue) -> Bytes

Source: std/protowkt.xo:91

decode_string_value

fn decode_string_value(b: Bytes) -> StringValue ! protobuf.ProtoErr

Source: std/protowkt.xo:92

encode_bytes_value

fn encode_bytes_value(m: BytesValue) -> Bytes

Source: std/protowkt.xo:93

decode_bytes_value

fn decode_bytes_value(b: Bytes) -> BytesValue ! protobuf.ProtoErr

Source: std/protowkt.xo:94

encode_value

fn encode_value(m: Value) -> Bytes

A Struct’s entries are written in key order (protobuf-go’s Deterministic marshaling).

Source: std/protowkt.xo:96

decode_value

fn decode_value(b: Bytes) -> Value ! protobuf.ProtoErr

Source: std/protowkt.xo:97

encode_struct

fn encode_struct(m: Struct) -> Bytes

Source: std/protowkt.xo:98

decode_struct

fn decode_struct(b: Bytes) -> Struct ! protobuf.ProtoErr

Source: std/protowkt.xo:99

encode_list_value

fn encode_list_value(m: ListValue) -> Bytes

Source: std/protowkt.xo:100

decode_list_value

fn decode_list_value(b: Bytes) -> ListValue ! protobuf.ProtoErr

Source: std/protowkt.xo:101

↑ index