Enum kiwi_schema::DefKind
[−]
[src]
pub enum DefKind { Enum, Struct, Message, }
Variants
Enum
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;
}
Struct
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;
}
Message
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]
impl PartialEq for DefKind
[src]
fn eq(&self, __arg_0: &DefKind) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.