Raxol.AgentClientProtocol.Rpc.RequestId (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

JSON-RPC request id: null | integer | string. Wire type is preserved exactly (no coercion between string and integer ids).

Ported from the MIT f1729/agent_client_protocol (c) 2025 f1729; see NOTICE.md.

Summary

Functions

Decode a valid wire id. Callers must check valid?/1 first.

Encode a valid id to its wire representation. Callers must check valid?/1 first.

True when term is a wire-valid request id (null | integer | string).

Types

t()

@type t() :: nil | integer() | String.t()

Functions

display(id)

@spec display(t()) :: String.t()

from_json(id)

@spec from_json(term()) :: t()

Decode a valid wire id. Callers must check valid?/1 first.

to_json(id)

@spec to_json(t()) :: nil | integer() | String.t()

Encode a valid id to its wire representation. Callers must check valid?/1 first.

valid?(id)

@spec valid?(term()) :: boolean()

True when term is a wire-valid request id (null | integer | string).