Struct distant_core::LspData [−][src]
pub struct LspData { /* fields omitted */ }
Expand description
Represents some data being communicated to/from an LSP consisting of a header and content part
Implementations
Returns a mutable reference to the header part
Returns a reference to the content part
Returns a mutable reference to the content part
Updates the header content length based on the current content
Creates a session’s info by inspecting the content for session parameters, removing the session parameters from the content. Will also adjust the content length header to match the new size of the content.
Attempts to read incoming lsp data from a buffered reader.
Note that this is blocking while it waits on the header information (or EOF)!
Content-Length: ...\r\n
Content-Type: ...\r\n
\r\n
{
"jsonrpc": "2.0",
...
}
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for LspData
impl UnwindSafe for LspData
Blanket Implementations
Mutably borrows from an owned value. Read more