Esc

Method

structextensionsince 0.36.1Source
  • macOS: Method works on macOS
  • Linux: Method works on Linux
  • Windows: Method works on Windows
  • Wasm: Method works on Wasm

Declaration

Method :: struct {
    path: string;    client_streaming: bool;    server_streaming: bool;}

Method descriptors preserve wire paths independently of generated identifiers.

Example
echo := Method.{ path = "/echo.Echo/Chat", client_streaming = true, server_streaming = true };
assert(echo.path == "/echo.Echo/Chat");

See also