Extra v0.2.0 Struct.Extra
Extensions to the built-in Struct module.
Link to this section Summary
Functions
Drops the given keys from the struct while honoring the struct’s original fields
Convenience function for extracting the top-level keys within a struct
Merges two of the same structs together
Link to this section Functions
Drops the given keys from the struct while honoring the struct’s original fields.
Convenience function for extracting the top-level keys within a struct.
This excludes the __struct__ key.
Merges two of the same structs together.
Using Map.merge/2 is not feasible because structs typically have default values of nil. This
function will not allow values of nil to overwrite non-nil values on merge.