PropertyDamage.ExternalMarker protocol (PropertyDamage v0.2.0)

View Source

Protocol for custom external marker types.

Domain libraries can define their own external marker types that implement this protocol, enabling external field markers without depending on PropertyDamage.

Example

defmodule MyDomain.ExternalId do
  defstruct [:field_name]
end

defimpl PropertyDamage.ExternalMarker, for: MyDomain.ExternalId do
  def external?(_), do: true
end

Then in your test project, these markers will be recognized automatically.

Summary

Types

t()

All the types that implement this protocol.

Functions

Returns true if this value is an external marker

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

external?(value)

@spec external?(term()) :: boolean()

Returns true if this value is an external marker