pub struct EnumDef {Show 13 fields
pub name: String,
pub rust_path: String,
pub original_rust_path: String,
pub variants: Vec<EnumVariant>,
pub doc: String,
pub cfg: Option<String>,
pub is_copy: bool,
pub has_serde: bool,
pub serde_tag: Option<String>,
pub serde_untagged: bool,
pub serde_rename_all: Option<String>,
pub binding_excluded: bool,
pub binding_exclusion_reason: Option<String>,
}Expand description
A public enum.
Fields§
§name: String§rust_path: String§original_rust_path: String§variants: Vec<EnumVariant>§doc: String§cfg: Option<String>§is_copy: boolTrue if the enum derives Copy. Only unit-variant enums can derive Copy.
Used by FFI codegen to avoid emitting .clone() (which trips clippy::clone_on_copy).
has_serde: boolTrue if the enum derives both serde::Serialize and serde::Deserialize.
Used by host-language emission (e.g. Swift Codable) to gate JSON-bridge conformance.
serde_tag: Option<String>Serde tag property name for internally tagged enums (from #[serde(tag = "...")])
serde_untagged: boolTrue when the enum has #[serde(untagged)].
Absence of serde_tag does NOT imply untagged — it means externally-tagged (the serde
default). Only set this when the attribute is explicitly present on the Rust type.
serde_rename_all: Option<String>Serde rename strategy for enum variants (from #[serde(rename_all = "...")])
binding_excluded: boolTrue when source metadata explicitly excludes this enum from generated
polyglot binding surfaces (via #[cfg_attr(alef, alef(skip))] or #[doc(hidden)]).
binding_exclusion_reason: Option<String>Human-readable reason for binding_excluded, used in diagnostics.