Skip to content

Definition

A named enum, struct or message of a Kiwi schema.

use helpers4::kiwi::Definition;

Cargo feature kiwi (enabled by default). To compile only this module:

cargo add helpers4 --no-default-features --features kiwi

or in Cargo.toml:

[dependencies]
helpers4 = { version = "0.0.11", default-features = false, features = ["kiwi"] }
pub struct Definition { /* private fields */ }
use helpers4::kiwi::{Definition, Kind};

let empty = Definition { name: "Empty".into(), kind: Kind::Message, fields: vec![] };
assert_eq!(&*empty.name, "Empty");

src/kiwi/definition.rs