mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 03:05:31 -05:00
22 lines
12 KiB
HTML
22 lines
12 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Jsonrpc2 (linol-lwt.Linol_lwt.Jsonrpc2)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">linol-lwt</a> » <a href="../index.html">Linol_lwt</a> » Jsonrpc2</nav><header class="odoc-preamble"><h1>Module <code><span>Linol_lwt.Jsonrpc2</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-IO"><a href="#module-IO" class="anchor"></a><code><span><span class="keyword">module</span> <a href="IO/index.html">IO</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Position"><a href="#module-Position" class="anchor"></a><code><span><span class="keyword">module</span> Position</span><span> = <a href="../../../lsp/Lsp/Types/Position/index.html">Lsp.Types.Position</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Range"><a href="#module-Range" class="anchor"></a><code><span><span class="keyword">module</span> Range</span><span> = <a href="../../../lsp/Lsp/Types/Range/index.html">Lsp.Types.Range</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Diagnostic"><a href="#module-Diagnostic" class="anchor"></a><code><span><span class="keyword">module</span> Diagnostic</span><span> = <a href="../../../lsp/Lsp/Types/Diagnostic/index.html">Lsp.Types.Diagnostic</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-DiagnosticSeverity"><a href="#module-DiagnosticSeverity" class="anchor"></a><code><span><span class="keyword">module</span> DiagnosticSeverity</span><span> = <a href="../../../lsp/Lsp/Types/DiagnosticSeverity/index.html">Lsp.Types.DiagnosticSeverity</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Req_id"><a href="#module-Req_id" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Req_id/index.html">Req_id</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-server_request_handler_pair"><a href="#type-server_request_handler_pair" class="anchor"></a><code><span><span class="keyword">type</span> server_request_handler_pair</span><span> = </span></code><ol><li id="type-server_request_handler_pair.Request_and_handler" class="def variant constructor anchored"><a href="#type-server_request_handler_pair.Request_and_handler" class="anchor"></a><code><span>| </span><span><span class="constructor">Request_and_handler</span> : <span><span class="type-var">'from_server</span> <a href="../../../lsp/Lsp/Server_request/index.html#type-t">Lsp.Server_request.t</a></span>
|
||
* <span>(<span><span><span>(<span class="type-var">'from_server</span>, <a href="../../../jsonrpc/Jsonrpc/Response/Error/index.html#type-t">Jsonrpc.Response.Error.t</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span>
|
||
<span>unit <a href="IO/index.html#type-t">IO.t</a></span>)</span> <span class="arrow">-></span> <a href="#type-server_request_handler_pair">server_request_handler_pair</a></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-send_request"><a href="#type-send_request" class="anchor"></a><code><span><span class="keyword">type</span> send_request</span><span> = <span><a href="#type-server_request_handler_pair">server_request_handler_pair</a> <span class="arrow">-></span></span> <span><a href="Req_id/index.html#type-t">Req_id.t</a> <a href="IO/index.html#type-t">IO.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec class anchored" id="class-base_server"><a href="#class-base_server" class="anchor"></a><code><span><span class="keyword">class</span> <span class="keyword">virtual</span> </span><span><a href="class-base_server/index.html">base_server</a></span><span> : <span class="keyword">object</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-async"><a href="#val-async" class="anchor"></a><code><span><span class="keyword">val</span> async : <span><a href="class-base_server/index.html">base_server</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span>)</span> <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec class anchored" id="class-notify_back"><a href="#class-notify_back" class="anchor"></a><code><span><span class="keyword">class</span> </span><span><a href="class-notify_back/index.html">notify_back</a></span><span> : <span><span class="label">notify_back</span>:<span>(<span><a href="../../../lsp/Lsp/Server_notification/index.html#type-t">Lsp.Server_notification.t</a> <span class="arrow">-></span></span>
|
||
<span>unit <a href="IO/index.html#type-t">IO.t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="label">server_request</span>:<span>(<span><a href="#type-server_request_handler_pair">server_request_handler_pair</a> <span class="arrow">-></span></span>
|
||
<span><a href="Req_id/index.html#type-t">Req_id.t</a> <a href="IO/index.html#type-t">IO.t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="label">workDoneToken</span>:<span><span>[ <span>`Int of int</span> <span><span>| `String</span> of string</span> ]</span> option</span> <span class="arrow">-></span></span> <span><span class="label">partialResultToken</span>:<span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="optlabel">?version</span>:
|
||
int <span class="arrow">-></span></span> <span><span class="optlabel">?uri</span>:<a href="../../../lsp/Lsp/Types/DocumentUri/index.html#type-t">Lsp.Types.DocumentUri.t</a> <span class="arrow">-></span></span> <span>unit <span class="arrow">-></span></span> <span class="keyword">object</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-doc_state"><a href="#type-doc_state" class="anchor"></a><code><span><span class="keyword">type</span> <span class="keyword">nonrec</span> doc_state</span><span> = </span><span>{</span></code><ol><li id="type-doc_state.uri" class="def record field anchored"><a href="#type-doc_state.uri" class="anchor"></a><code><span>uri : <a href="../../../lsp/Lsp/Types/DocumentUri/index.html#type-t">Lsp.Types.DocumentUri.t</a>;</span></code></li><li id="type-doc_state.languageId" class="def record field anchored"><a href="#type-doc_state.languageId" class="anchor"></a><code><span>languageId : string;</span></code></li><li id="type-doc_state.version" class="def record field anchored"><a href="#type-doc_state.version" class="anchor"></a><code><span>version : int;</span></code></li><li id="type-doc_state.content" class="def record field anchored"><a href="#type-doc_state.content" class="anchor"></a><code><span>content : string;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec class anchored" id="class-server"><a href="#class-server" class="anchor"></a><code><span><span class="keyword">class</span> <span class="keyword">virtual</span> </span><span><a href="class-server/index.html">server</a></span><span> : <span class="keyword">object</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||
<span><span class="optlabel">?on_received</span>:<span>(<span><a href="../../../yojson/Yojson/Safe/index.html#type-t">Yojson.Safe.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?on_sent</span>:<span>(<span><a href="../../../yojson/Yojson/Safe/index.html#type-t">Yojson.Safe.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="label">ic</span>:<a href="IO/index.html#type-in_channel">IO.in_channel</a> <span class="arrow">-></span></span>
|
||
<span><span class="label">oc</span>:<a href="IO/index.html#type-out_channel">IO.out_channel</a> <span class="arrow">-></span></span>
|
||
<span><a href="class-server/index.html">server</a> <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create_stdio"><a href="#val-create_stdio" class="anchor"></a><code><span><span class="keyword">val</span> create_stdio :
|
||
<span><span class="optlabel">?on_received</span>:<span>(<span><a href="../../../yojson/Yojson/Safe/index.html#type-t">Yojson.Safe.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?on_sent</span>:<span>(<span><a href="../../../yojson/Yojson/Safe/index.html#type-t">Yojson.Safe.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="label">env</span>:<a href="IO/index.html#type-env">IO.env</a> <span class="arrow">-></span></span>
|
||
<span><a href="class-server/index.html">server</a> <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-send_server_notification"><a href="#val-send_server_notification" class="anchor"></a><code><span><span class="keyword">val</span> send_server_notification : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../../lsp/Lsp/Server_notification/index.html#type-t">Lsp.Server_notification.t</a> <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-send_server_request"><a href="#val-send_server_request" class="anchor"></a><code><span><span class="keyword">val</span> send_server_request :
|
||
<span><a href="#type-t">t</a> <span class="arrow">-></span></span>
|
||
<span><span><span class="type-var">'from_server</span> <a href="../../../lsp/Lsp/Server_request/index.html#type-t">Lsp.Server_request.t</a></span> <span class="arrow">-></span></span>
|
||
<span><span>(<span><span><span>(<span class="type-var">'from_server</span>, <a href="../../../jsonrpc/Jsonrpc/Response/Error/index.html#type-t">Jsonrpc.Response.Error.t</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||
<span><a href="Req_id/index.html#type-t">Req_id.t</a> <a href="IO/index.html#type-t">IO.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run"><a href="#val-run" class="anchor"></a><code><span><span class="keyword">val</span> run : <span><span class="optlabel">?shutdown</span>:<span>(<span>unit <span class="arrow">-></span></span> bool)</span> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span></span></code></div></div></div></body></html>
|