Enum kiwi_schema::DefKind[][src]

pub enum DefKind {
    Enum,
    Struct,
    Message,
}

Variants

Enums are encoded as variable-length unsigned integers under the hood. Declaring one in the textual Kiwi format looks like this:

enum Example {
  A = 100;
  B = 200;
}

Structs are tuples of fields and are encoded by encoding each field in order. All fields are guaranteed to be present. Declaring one in the textual Kiwi format looks like this:

struct Example {
  int a;
  int b;
}

Messages are objects filled with optional fields and are encoded as a sequence of (id, value) pairs followed by a zero byte. All fields are optional and may not be present. Declaring one in the textual Kiwi format looks like this:

message Example {
  int a = 1;
  int b = 2;
}

Trait Implementations

impl Debug for DefKind
[src]

Formats the value using the given formatter. Read more

impl PartialEq for DefKind
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for DefKind
[src]

Auto Trait Implementations

impl Send for DefKind

impl Sync for DefKind