@spec delta_struct(path(), struct(), struct()) :: delta_spec() def delta_struct(path, %a_s{} = a, %b_s{} = b) when a_s != b_s, do: delta_simple(path, a, b) def delta_struct(path, a, b), do: delta_map(path, Map.from_struct(a), Map.from_struct(b))