GitSnapshot.Snapshot protocol (git_snapshot v0.1.8)
View SourceProtocol for data into their snapshot representations.
Snapshots can only be printable string content or it won't be great for getting compared by humans / in git.
Example
defmodule TestStruct do
defstruct value: <<1, 2, 3>>
defimpl GitSnapshot.Snapshot do
def to_string(struct) do
Base.encode16(struct.value)
end
end
end
Summary
Types
@type t() :: term()
All the types that implement this protocol.