Skip to main content

encode_tools_list_response

Function encode_tools_list_response 

Source
pub fn encode_tools_list_response(
    id: JsonRpcId,
    include_diagnostics: bool,
) -> Result<WireMessage, DebugProtocolError>
Expand description

The tool list, which is the one place a build’s capability shows.

include_diagnostics is the server’s diagnostics feature. The protocol types for diagnostics exist unconditionally, so a build that cannot collect them has to say so here rather than by failing to define them. Advertising a tool that answers every call with an error would be worse than omitting it: a client would report the app as broken instead of as a plain build.