[][src]Enum kiwi_schema::DefKind

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 Eq for DefKind[src]

impl PartialEq<DefKind> for DefKind[src]

impl StructuralEq for DefKind[src]

impl StructuralPartialEq for DefKind[src]

Auto Trait Implementations

impl RefUnwindSafe for DefKind

impl Send for DefKind

impl Sync for DefKind

impl Unpin for DefKind

impl UnwindSafe for DefKind

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.