Skip to content

Field

One field of a Definition. On an enum, a field is a member: only its name and value matter.

use helpers4::kiwi::Field;

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 Field { /* private fields */ }
use helpers4::kiwi::{Field, FieldType};

let field = Field { name: "id".into(), field_type: Some(FieldType::Uint), is_array: false, value: 1 };
assert_eq!(&*field.name, "id");

src/kiwi/definition.rs