Skip to content

Kind

What a Definition is: an enum, a struct (all its fields, in order) or a message (any of its fields, each with an id, ended by a 0).

use helpers4::kiwi::Kind;

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"] }
#[non_exhaustive]
pub enum Kind {
    /// A set of named numbers.
    Enum,
    /// A fixed list of fields, always all present.
    Struct,
    /// A list of optional fields, each written with its id.
    Message,
}
use helpers4::kiwi::Kind;

assert_ne!(Kind::Enum, Kind::Message);

src/kiwi/definition.rs