Skip to main content

Module pending

Module pending 

Source
Expand description

Pending<T> – the typed handle returned by every actor-side request. Mirrors lattice_runtime::Pending (DESIGN.md §5.2.1) but parameterised over LspError so server-side error codes survive on the way back to the caller.

Three usage patterns, identical to the runtime’s Pending:

  1. Async caller (the editor’s input pipeline): pending.await.
  2. Sync caller in tokio (#[tokio::test]): same.
  3. Sync caller outside tokio (the TUI input loop): pending.blocking_recv() parks the current thread.

Structs§

InvocationId
Process-monotonic id for an LSP request – distinct from the JSON-RPC RequestId on the wire (which is per-server). Useful for telemetry: an InvocationId survives a server restart while the wire id resets.
Pending
One in-flight LSP request awaiting a response.