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 Eq for DefKind
impl StructuralPartialEq for DefKind
Auto Trait Implementations§
impl Freeze for DefKind
impl RefUnwindSafe for DefKind
impl Send for DefKind
impl Sync for DefKind
impl Unpin for DefKind
impl UnwindSafe for DefKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more