ClaudeWrapper.Result (ClaudeWrapper v0.4.0)

Copy Markdown View Source

Result from a completed query execution.

Maps to the Rust QueryResult — the parsed JSON output from --output-format json.

Summary

Functions

Parse a result from the JSON output of a query command.

Types

t()

@type t() :: %ClaudeWrapper.Result{
  cost_usd: float() | nil,
  duration_ms: non_neg_integer() | nil,
  extra: map(),
  is_error: boolean(),
  num_turns: non_neg_integer() | nil,
  result: String.t(),
  session_id: String.t() | nil
}

Functions

from_json(data)

@spec from_json(map()) :: t()

Parse a result from the JSON output of a query command.