pub fn parse_streaming<'a>(
buffer: &'a [u8],
options: &ParseOptions,
streaming_threshold: usize,
) -> Result<ParseProgress<'a>, ParseError>Expand description
Parse a memcache command with streaming support for large values.
For SET commands with values >= streaming_threshold, this returns
NeedValue after parsing the header, allowing the caller to receive
the value directly into a target buffer.
For all other commands (including small SETs), it behaves identically to
Command::parse_with_options().
§Arguments
buffer- The input buffer containing memcache protocol dataoptions- Parse options (max lengths, etc.)streaming_threshold- Minimum value size for streaming (useSTREAMING_THRESHOLD)
§Returns
Ok(ParseProgress::Incomplete)- Need more dataOk(ParseProgress::NeedValue { .. })- SET header parsed, value pendingOk(ParseProgress::Complete(cmd, consumed))- Fully parsed commandErr(ParseError)- Parse error