pub struct FieldDef {Show 13 fields
pub name: String,
pub ty: TypeRef,
pub optional: bool,
pub default: Option<String>,
pub doc: String,
pub sanitized: bool,
pub is_boxed: bool,
pub type_rust_path: Option<String>,
pub cfg: Option<String>,
pub typed_default: Option<DefaultValue>,
pub core_wrapper: CoreWrapper,
pub vec_inner_core_wrapper: CoreWrapper,
pub newtype_wrapper: Option<String>,
}Expand description
A field on a public struct.
Fields§
§name: String§ty: TypeRef§optional: bool§default: Option<String>§doc: String§sanitized: boolTrue if this field’s type was sanitized (e.g., Duration→u64, trait object→String). Fields marked sanitized cannot participate in auto-generated From/Into conversions.
is_boxed: boolTrue if the core field type is Box<T> (or Option<Box<T>>).
Used by FFI backends to insert proper deref when cloning field values.
type_rust_path: Option<String>Fully qualified Rust path for the field’s type (e.g. my_crate::types::OutputFormat).
Used by backends to disambiguate types with the same short name.
cfg: Option<String>#[cfg(...)] condition string on this field, if any.
Used by backends to conditionally include fields in struct literals.
typed_default: Option<DefaultValue>Typed default value for language-native default emission.
core_wrapper: CoreWrapperCore wrapper on this field (Cow, Arc, Bytes). Affects From/Into codegen.
vec_inner_core_wrapper: CoreWrapperCore wrapper on Vec inner elements (e.g., Vec<Arc<T>>).
newtype_wrapper: Option<String>Full Rust path of the newtype wrapper that was resolved away for this field,
e.g. "my_crate::NodeIndex" when NodeIndex(u32) was resolved to u32.
When set, binding→core codegen must wrap values into the newtype
(e.g. my_crate::NodeIndex(val.field)) and core→binding codegen must unwrap (.0).