Expand description
The daemon wire protocol: length-prefixed frames over a Unix socket.
Deliberately tiny and hand-encoded (no serde): a request is one tag byte plus fields; the
response is a stream of non-empty data frames terminated by a zero-length frame, so results
(rendered path:line:text, a file list, or status text) flow without buffering huge sets.
Structs§
Enums§
Constants§
- FIND_
HEADER_ SENTINEL Findresponses optionally lead with a one-line header\x01<total>\t<start>\t<returned>\t<next_after>\nso the client can report the true total (not just the truncated page), the keyset offset (start= items skipped before this page, for an honest “X-Y of N” range), and resume vianext_after. The0x01sentinel can’t begin a real path line, and older/headerless blobs parse as all-paths.
Functions§
- end_
stream - format_
find_ header - parse_
find_ header - Split a
Findresponse blob into its optional header and the remaining path lines. - read_
request - read_
stream - Read a response stream, writing each chunk to
sink; returns total bytes written. - read_
stream_ to_ vec - Convenience: collect a whole response stream into a
Vec(for small responses like status/find). - read_
watch_ frame - Read one frame from an open-ended stream (e.g.
Watch), returningNonewhen the stream ends (zero-length terminator or the daemon closing the connection). - write_
data - Responses are a stream of non-empty data frames terminated by a zero-length frame, so the daemon can emit results as it finds them and the client writes them straight to stdout (no buffering of huge result sets on either side).
- write_
request