An exact-versioned extension method mapped to a static operation term.
Summary
Functions
Builds a method for an extension's Snodo.Extension.methods/0 list.
Types
@type t() :: %Snodo.Extension.Method{ direction: :client_to_server, kind: :request, name: String.t(), operation: term(), params: :required | :optional, protocol_version: String.t(), rule: Snodo.Protocol.Profile.Method.t() }
Functions
Builds a method for an extension's Snodo.Extension.methods/0 list.
Options:
:protocol_version- the exact protocol version the method belongs to, such as"2026-07-28". Required.:name- the JSON-RPC method name. Required.:operation- the term passed to the extension'sSnodo.Extension.validate_operation/3,Snodo.Extension.dispatch/3, andSnodo.Extension.shape_result/3. Required.:params-:required(the default) or:optional: whether a request must carryparams.:kindand:direction- only:requestand:client_to_server, the defaults, are supported.
A missing required option raises KeyError; an invalid value raises
ArgumentError.
Snodo.Extension.Method.new!(
protocol_version: "2026-07-28",
name: "dev.example/greet",
operation: :greet
)