Skip to main content

gen_rustler_kwargs_constructor_with_exclude

Function gen_rustler_kwargs_constructor_with_exclude 

Source
pub fn gen_rustler_kwargs_constructor_with_exclude(
    typ: &TypeDef,
    _type_mapper: &dyn Fn(&TypeRef) -> String,
    exclude_fields: &HashSet<String>,
) -> String
Expand description

Generate a Rustler (Elixir) kwargs constructor for a type with has_default. Accepts keyword list or map, applies defaults for missing fields. Fields in exclude_fields are skipped (used for bridge fields that cannot implement Encoder/Decoder).