GenAI.Graph.MermaidProtocol protocol (GenAI Core v0.2.0)

Mermaid Encode Protocol.

Link to this section Summary

Types

t()

All the types that implement this protocol.

Functions

Convert element to mermaid output.

Convert element to mermaid output.

Convert element to mermaid output.

Format an ID for use in a Mermaid diagram.

Link to this section Types

@type t() :: term()

All the types that implement this protocol.

Link to this section Functions

Link to this function

encode(graph_element)

@spec encode(term()) :: {:ok, term()} | {:error, term()}

Convert element to mermaid output.

Link to this function

encode(graph_element, options)

@spec encode(term(), term()) :: {:ok, term()} | {:error, term()}

Convert element to mermaid output.

Link to this function

encode(graph_element, options, state)

@spec encode(term(), term(), term()) :: {:ok, term()} | {:error, term()}

Convert element to mermaid output.

@spec mermaid_id(term()) :: term()

Format an ID for use in a Mermaid diagram.