# `MnemosyneZvex.Encoding`

Encodes `Mnemosyne.Graph.Node.*` structs into `Zvex.Document` values for
Zvex storage, and decodes them back. The `:links` field is stripped on
encode and re-attached by the caller (from the sidecar). The `:embedding`
field is encoded into the dedicated vector column.

# `decode`

```elixir
@spec decode(map()) :: struct()
```

Decodes a Zvex document fields map back into the original Mnemosyne node
struct. The returned struct has `:links` set to empty — the caller must
merge in the sidecar links before returning to Mnemosyne.

# `encode`

```elixir
@spec encode(
  struct(),
  pos_integer()
) :: Zvex.Document.t()
```

Encodes a Mnemosyne node into a `Zvex.Document` ready for upsert.

# `encode_many`

```elixir
@spec encode_many([struct()], pos_integer()) :: [Zvex.Document.t()]
```

Encodes a list of nodes.

# `node_module?`

```elixir
@spec node_module?(module()) :: boolean()
```

Recognises the seven supported Mnemosyne node-struct modules.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
