Skip to main content

parse_message

Function parse_message 

Source
pub fn parse_message(line: &str) -> Result<IpcMessage>
Expand description

Parse a single NDJSON line into an IpcMessage.

Why: Callers read one line at a time from the IPC pipe; this helper strips any trailing newline and decodes the JSON object. What: Returns Ok(IpcMessage) or an error with context. Test: Feed known-good JSON for each variant and assert equality; feed malformed JSON and assert Err.