Functions§
- can_
generate_ default_ impl - Check if a type’s fields can all be safely defaulted.
Primitives, strings, collections, Options, and Duration all have Default impls.
Named types (custom structs) only have Default if explicitly marked with
has_default=true. If any field is a Named type withouthas_default, returning true would generate code that callsDefault::default()on a type that doesn’t implement it. - gen_
opaque_ struct - Generate an opaque wrapper struct with
inner: Arc<core::Type>. For trait types, usesArc<dyn Type + Send + Sync>. For types with&mut selfmethods, usesArc<Mutex<core::Type>>. - gen_
opaque_ struct_ prefixed - Generate an opaque wrapper struct with
inner: Arc<core::Type>and a name prefix. For types with&mut selfmethods, usesArc<Mutex<core::Type>>. - gen_
struct - Generate a struct definition using the builder.
- gen_
struct_ default_ impl - Generate a
Defaultimpl for a non-opaque binding struct withhas_default. All fields use their type’s Default::default(). Optional fields use None instead of Default::default(). This enables the struct to be used withunwrap_or_default()in config constructors. - gen_
struct_ with_ per_ field_ attrs - Generate a struct definition using the builder, with a per-field attribute callback.
- type_
needs_ mutex - Check if any method on a type takes
&mut self, meaning the opaque wrapper must useArc<Mutex<T>>instead ofArc<T>to allow interior mutability.