Svelixir.Manifest.FileEntry (svelixir v0.11.0)

Copy Markdown

One file a component owns or contributes to (SDD 7.3).

mode and key are exclusive. :contributes names one block inside a file the component shares with others and REQUIRES a key; :sole_owner and :seed take the whole file and must carry none. A nil key is omitted from the encoded entry rather than written as key: nil, so the bytes match SDD 8.2 exactly.

There is no :overwritable mode. It is SDD 4.1 defect 5/6 — a mode nothing downstream can act on — and it appears here only as a value the last clause of validate!/1 rejects, so it can never become a phantom class.

Summary

Types

mode()

@type mode() :: :sole_owner | :contributes | :seed

t()

@type t() :: %Svelixir.Manifest.FileEntry{
  hash: String.t(),
  key: atom() | nil,
  mode: mode(),
  path: String.t()
}